4 ms·
Hard to compare exactly with that classification, but JavaScript only has the first one, and arguably parts of the fourth one. metaclasses isn't really a major
by Jasper_ 5y ago
Hard to compare exactly with that classification, but JavaScript only has the first one, and arguably parts of the fourth one.
metaclasses isn't really a major optimization hazard, it effectively boils down to hijacking the "class" syntax to instead run some custom code. It's used by things like dataclasses and the Django ORM to use class syntax to make a little DSL.
- ericvsmith 5y agodataclasses do not use metaclasses (I’m the dataclasses author).
- Jasper_ 5y agoApologies, I must have been confusing it with some other Python syntax tricks I've seen. I don't write too much Python anymore..