4 ms·
> This is the second time I've seen in this thread that people lump Crockford in with Java enterprise folks, but Crockford routinely says `class` was the worst
by horsawlarway 3y ago
> This is the second time I've seen in this thread that people lump Crockford in with Java enterprise folks, but Crockford routinely says `class` was the worst addition to JS.
Because Crockford was one of the people advocating for a particular style of initialization of objects that mirrored classes, but was not directly a class before classes existed in JS. (see: https://crockford.com/javascript/inheritance.html https://crockford.com/javascript/inheritance.html)
It is utterly enterprise and classlike in nature though, and not my cup of tea. Mainly - I just wanted enterprise folks to stop trying to re-invent classes in the language, and the class keyword stopped that behavior.
Big net win for the language in my opinion - even though I personally still don't use classes all that often.
---
His modern take is fairly reasonable, though.
- JBits 3y agoHis modern take, advocating prototypes, has been around since 2006 (https://crockford.com/javascript/prototypal.html https://crockford.com/javascript/prototypal.html).
- horsawlarway 3y agoI know - I just keep getting older... hard to believe that was nearly 20 years back now, and not 20 months.