4 ms·
Well...... The next version of JavaScript will have you know class. .. So I guess the javascript designers are going against the nature of JavaScript by bolti
by ThinkBeat 13y ago
Well......
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. ;)