2 ms·
Speaking of prototypal object systems, is there still an application for JavaScript prototypes today? I can't remember interacting with them even once in the la
by Tabular-Iceberg 4y ago
Speaking of prototypal object systems, is there still an application for JavaScript prototypes today? I can't remember interacting with them even once in the last five years unless it was some legacy code from long before that.
That said, I don't think classes was much of an improvement. I've seen a lot of profoundly stupid code come out of it, like singletons with a static getInstance(), just because that's what you do in Java, never mind that JavaScript has object literals. Then again before that I saw the same stupid singletons, but implemented with prototypes instead.