2 ms·
Metaclasses for things like "interface" and "value" sound fantastic, and will get rid of huge amounts of boilerplate, but I wonder how flexible they really are.
by iainmerrick 9y ago
Metaclasses for things like "interface" and "value" sound fantastic, and will get rid of huge amounts of boilerplate, but I wonder how flexible they really are.
I don't immediately see a way to implement something like C#'s extension methods, or Objective-C categories, for example -- extending classes with new methods. Those are incredibly useful when integrating with an existing codebase.
Metaclasses just seem like a way to do existing C++ stuff in a cleaner and terser way. Definitely very useful but maybe not a huge game changer.
I'm also concerned at the potential impact on compile times once people start using metaclasses very heavily; but maybe it won't be as bad as templates in that respect.