4 ms·
Learning a language is about more than just the syntax, it's also about learning the idiomatic way to program in the language. This framework appears to hide t
by stygiansonic 13y ago
Learning a language is about more than just the syntax, it's also about learning the idiomatic way to program in the language. This framework appears to hide the true prototype nature of JavaScript by bolting on a class-based structure, going against the language features the designers already gave JavaScript for things like inheritance.
Admittedly, JavaScript has suffered from a lack of strong idiomatic principles. (But that has improved in recent years with things projects like CommonJS, RequireJS and Browserify)
While I admire the effort that went into a project like this, I can't help but wonder whether it will delay a developer's understanding of JavaScript rather than ease the transition into it.
- tracker1 13y agoI have to agree... I didn't even get that far and think to myself, this is horribly ugly... Not to mention much of the sugar is buried in strings. You'd be better off going with TypeScript or CoffeeScript that at least have similar support, with linters/tools in place. This seems like a hack waiting for a large broken codebase.
- ThinkBeat 13y agoWell...... The next version of JavaScript will have you know class. .. So I guess the javascript designers are going against the nature of JavaScript by bolting on a class-based structure going against the language features the designers already gave JavaScript for things like inheritance.
- Touche 13y agoES6 classes are just syntatic sugar for the way people already build constructor/prototype objects.
- stygiansonic 13y agoGood point. However, if this was a shim for some future language feature it would probably be a good idea. It doesn't appear to be and if it was widely used, would only add to the confusion once language support for classes did emerge. Furthermore it appears to put variable name declarations within strings, which might further confuse editors/IDEs that already have trouble with the dynamic nature of the language. I really don't mean to belittle as I'm sure a lot of effort was put into this project. It may serve a purpose somewhere and someone may find it beneficial. I just feel that it goes against the language constructs a little bit too much.
- TheZenPsycho 13y agoit's not bolt on. "class" means something subtly other than what you think it does, in this context, following in the long loved javascript tradition of looking eerily like java's syntax while behaving in weird utterly surprising ways. (surprising to a java developer). But you know, you guys WANTED "classes" so there you go. ;)