by cageface · 11y ago · 0 comments
Javascript is a flawed, quirky language, but with the upcoming ES6 and ES7 standards it's going to be a much, much better. I'd call it a tossup comparing it to Python or Ruby. I wouldn't have recommended JS to a beginner a few years ago either but that's where the momentum is now and, as the author says, the ease with which a newbie can get something interactive up on screen trumps smaller concerns. For a little more rigor you can use something like Typescript.
Examples:
* "Class" syntax
* Comprehensions
* Modules
* `let` scoping
* Generators
It's a whole new ball game.I think a lot (over 50%) of JavaScript devs 5 years from now will still be using <= ES5, but only because they've so settled in their ways over the last 10 years.
Funny, I'd make the opposite prediction... the JavaScript devs I've known have been among the most curious and open-minded developers about different ways of doing things, interested in experimenting with different idioms made available by the flexibility of the fundamental language, and quick to adopt them they found them useful (possibly too quick). They're people who figured out how to get many of the benefits of the language features you've listed above starting with the language features that were available years ago.
Which kindof makes sense: everybody else was too busy complaining about function scope instead of block scope or how they couldn't get their heads around Prototypes instead of Classes or having to reason about this scope or truthy/falsey values or whichever difference/wart scared them off to bother learning to use the tools at hand.
No, my bet would be that ES6 adoption will take up a lot quicker than, say, Python 3.
(and most of the lagging will probably happen around frameworks with imported paradigms -- Angular 1.x, I'm looking at you in particular -- and other aging codebases).
5 years from now, there will still be people whose customers require IE6 support, too. We're still working on that.
A flawed, quirky language is a problem when learning, because it increases the number of things that have to be learned.
But yes, your other points are correct. Tooling is far more important.
It's not quite the same size, but the Racket standard library is fairly close in size to pythons. It also has better GUI support, IIRC. It's selection of other libraries isn't quite as broad either, but it's decently sized, and you can use some things written for other implementations (well, mainly ones written in pure scheme).
It is definitely the most complete Scheme available, which I believe is why they gave up the PLT Scheme name, to disassociate from the "bare bones" assumption of Scheme. And yes, it's GUI support is relatively better than Python's. But it's not objectively good. It tends to have mostly bare-minimum implementations of libraries. For example, the work done for connecting to databases is basically nothing more than a DB connection. Web development is basically no more than HTTP request parsing.
There's no Django or Rails or even Express for Racket.
i believe chrome apps may have some steps toward this, though not sure... at 1 point i considered trying to make a browser-based GUI that does all local RPC communication to a c++ app, but i feel like you know.... there should be a nice standard way of doing this out there
1. https://code.google.com/p/chromiumembedded/ 2. http://blog.atom.io/2014/05/06/atom-is-now-open-source.html 3. http://appjs.com
PhoneGap provides this kind of experience for mobile.
The issue always ends up being performance -- running the JS runtimes in sandboxed webviews is always* slower than native code.
There is no competition to Javascript for programming browsers, but why should programming education always center on programming browsers? For education in particular, there are a number of languages designed for education and Javascript (even ES6) has never been one of them.
No accounting for taste, I guess.
Visual Basic was also pretty awesome for this, and I'm sad to see that give way to e.g. Java, which has probably turned many people off initially to how fun and rewarding programming can be.
TL;DR public static void main is not as fun as making more internet.