4 ms·
Interesting. I've been working with JavaScript for the past few months in a class-heirarchy environment (Educational games using a proprietary engine), and it
by Betelgeuse90 12y ago
Interesting.
I've been working with JavaScript for the past few months in a class-heirarchy environment (Educational games using a proprietary engine), and it seems to be working pretty okay.
I guess it might be because the hierarchy isn't very complex as far as I'm concerned. A lot of the ugliness in the engine is abstracted away from me as a game developer.
- ericelliott 12y ago> it seems to be working pretty okay. These things have a tendency to balloon out of control over time. I've seen class hierarchies start out very benign. Convenient and well-designed, even. But as the codebase grows and new objects need to be modeled, it inevitably gets stretched beyond the limits of its original design, and that's where things start to crumble. Also, the more layers of inheritance there are, the more brittle the code becomes due to tight coupling between child and parent classes. Super calls start to turn into a tangled nightmare. Here's a different perspective on the same topic: http://berniesumption.com/software/inheritance-is-evil-and-must-be-destroyed/ http://berniesumption.com/software/inheritance-is-evil-and-m...