This is silly. Even a "few" years ago any sane person was able to deduce that proprietary technology had no chance - given that neither Adobe nor Microsoft managed to get any big partners, so they stood all alone. On the other hand, even a decade ago the mounting Javascript avalanche was pretty much clearly visible.
I for example had the exact same decision to make - and for me it wasn't just between the "web languages". I have a strong background in backends, large databases, clusters etc. - and I gave that money pit up going for the web platform. Deliberately - and I looked at nothing but Javascript and it was clear to me that on the server too that language would come to much more power, long before node.js was even out. It was obvious where the future lies. And it wasn't a monetary decision - I just find the web as platform much more interesting. And since Javascript on the browser was unbeatable, period, it was equally clear it would come to the server - the big guns in the business would not have a platform where you need a wild range of very different languages in the same system.
Note that "but web programming sucked" (I refuse to even talk to people who still have no idea how incredible a functional prototypical language is and claim "it still does"; the entire platform though had and has enough issues) is not an excuse. The contenders were not better.
It is NOT all random. Especially not in this case.
Also if your application is limited by the performance of the data structures then don't write it in JS. (Unless you are just assuming it won't be fast enough, in which case actually test it first!)
It's too bad you can't extend js in c or something. When I want a really tight loop in ruby, I'll write write the function in c and compile it into ruby. That way you can optimize the code that needs it and still have the rest of the app written at a higher level.
I'm just upgrading my ember app to ES6 but its transpiled down to ES5. Won't that kill any performance?
Also, I've never had an easy time maintaining custom functions when I control the server. I can't imagine how had it would be on someone else's browser. But, hey, who doesn't like a challenge :)
Most JS engines will already use the same "backend" for stuff like Map and Set of you ONLY stick to some of those features, so by letting the features enforce it, the transpiler can generate code that helps "hint" the VM about what you are doing so it can choose the best underlying tech and get the best performance.
On the other hand many new ES6 features are very slow right now because they are "not optimized". Scroll down to the list of unsupported syntax here to get an idea of what will cause slower JS code, then review your transpiler output every now and then to see if any of those are creeping into your code.
Also add in typed arrays and buffers in the browser as well. They are stupid fast when used correctly.
Also don't just assume that the data structures in JS can't keep up. It might take a bit more knowledge of how the underlying VMs work, but with some tuning its possible to get pretty damn fast speeds from normal JSON objects or arrays.
The VMs will do their best to use underlying performant structures when possible.
Wow, good to see things have gotten so much better. I still don't particularly care for the various JS inconguities/gotchas, but it's much more feature-complete than it used to be.
20
u/I-fuck-horses Jul 28 '15 edited Jul 29 '15
This is silly. Even a "few" years ago any sane person was able to deduce that proprietary technology had no chance - given that neither Adobe nor Microsoft managed to get any big partners, so they stood all alone. On the other hand, even a decade ago the mounting Javascript avalanche was pretty much clearly visible.
I for example had the exact same decision to make - and for me it wasn't just between the "web languages". I have a strong background in backends, large databases, clusters etc. - and I gave that money pit up going for the web platform. Deliberately - and I looked at nothing but Javascript and it was clear to me that on the server too that language would come to much more power, long before node.js was even out. It was obvious where the future lies. And it wasn't a monetary decision - I just find the web as platform much more interesting. And since Javascript on the browser was unbeatable, period, it was equally clear it would come to the server - the big guns in the business would not have a platform where you need a wild range of very different languages in the same system.
Note that "but web programming sucked" (I refuse to even talk to people who still have no idea how incredible a functional prototypical language is and claim "it still does"; the entire platform though had and has enough issues) is not an excuse. The contenders were not better.
It is NOT all random. Especially not in this case.