Re:GNU ease.js
by stygiansonic on Wednesday March 26, 2014 @07:35PM
(#7477484)
Good 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.
ES6 classes are just syntatic sugar for the way people already build constructor/prototype objects.
Re:GNU ease.js
by TheZenPsycho on Wednesday March 26, 2014 @07:53PM
(#7477569)
it'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. ;)
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.