Delphi Haven – While it wasn’t the main point of the post, I did mention previously the possibility of using metaclasses as generic helpers, and how this can be preferable to using interfaces. An esteemed commentator then suggested the example I gave was far too trivial to be generalised, and in particular, that the hacky cleverness of Generics.Defaults was all very necessary. This rather sounded like a challenge, and one I should take up — so I have! The context here is how the classes in Generics.Collections need some help to do their work, given they cannot specify operator constraints. ...
Visits by Source
Users who voted for this posting