3 ms·
This seems to still miss the critical mechanism that metaclasses provide to the language. There are many ways to enforce a constraint from dervied classes to b
by jamesdutc 11y ago
This seems to still miss the critical mechanism that metaclasses provide to the language.
There are many ways to enforce a constraint from dervied classes to base classes.
Metaclasses are the only* way to enforce a constraint from a base class to a derived class.
(* there's actually another way, but don't do it.)
- pandler 11y agoWell, since you mentioned it... what is the other way? I'm curious. I promise I won't do it.