Hacker News new | ask | show | jobs
by AndrewDucker 4565 days ago
Only if they want ultra-high performance, for writing games and suchlike.

Otherwise they can stick to javascript.

(And, of course, anything else that compiles to javascript)

3 comments

You can also mix the two, write typical JS and use a high-performance library from JS for something specific, like physics

http://kripken.github.io/box2d.js/webgl_demo/box2d.html

To be fair, if you want ultra-high performance for high quality 3d games, why did you learn javascript? Go away and learn C or C++ ...

This doesn't give anything to web developers. It gives C / C++ developers a way onto the web.

> To be fair, if you want ultra-high performance for high quality 3d games, why did you learn javascript?

That's not fair at all, because there are valid answers to that question like "Because I also want my programs to run in the browser."

Until recently, that was a contradictory set of goals. Now it's pretty feasible to achieve both goals using C++. But, not so much with hand-written JS... (Feasible, not arguing theoretical)
Kindasorta. They do contradict if you only write one program. But you could write a high-performance 3D game and a web app and achieve both goals, thus justifying learning both JavaScript and C++.
What makes you think that many web developers don't already know C/C++?

Many developers choose the web because there is their audience, their business, their future. And we know that people don't like to install stuffs, they want to consume a product LIVE.

Well, you can also write asm.js code manually to squeeze out performance, if you need to.
it's faster to learn C and all the toolchain than writing any meaningfull code in asm.js directly, asm.js is not javascript, as strange as it sounds.
I don't mean to write your app in it, I mean using it for optimising tight loops and such, just as C developers occasionally write some functions in asm for performance.
> Only if they want ultra-high performance, for writing games and suchlike.

CUSTOMERS want ultra high performances, especially on mobile. Therefore businesses will have to deliver these performances.

Trust me, in a few years , getting a good client-side gig will mean knowing C/C++ .

The limitation today is the size of the "js" code produced, which is way too heavy.