3 ms·
I sometimes bang my head against the wall when I see stuff like this coming from Google, they should have higher standards. The lack of class keyword in JavaSc
by voidr 15y ago
I sometimes bang my head against the wall when I see stuff like this coming from Google, they should have higher standards.
The lack of class keyword in JavaScript is not the problem, if you want that so badly, because you can't code in anything but classes then just write a preprocessor for it, it would probably take a few hours or just use CoffeeScript. Google is helping here though with source maps, but it's kind of disappointing that they make statements like this along the way.
Don't want preprocessor?
Use something like this: http://ejohn.org/blog/simple-javascript-inheritance/ http://ejohn.org/blog/simple-javascript-inheritance/
Or this: https://github.com/shichuan/javascript-patterns/blob/master/code-reuse-patterns/klass.html https://github.com/shichuan/javascript-patterns/blob/master/...
There are a lot of problems not even related to JavaScript that are way worse than the lack of the class macro, just look at CSS.
The main thing I see here is that Google has a lot of Java people that are reluctant to learn anything besides Java constructs and they want to make web programming accessible to them so they can zerg rush development, GWT pretty much proves this, but the funny thing is that I think they didn't use GWT in G+ because it sucked.
Google should learn from Facebook, Facebook's front end JavaScript is mostly "hand coded" and not generated from another language.