Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I may be out of the loop here, but wasn't the big benefit of JavaScript everywhere that it's the same JavaScript everywhere?

Does it matter if server-side is JavaScript Next Gen and browsers lag by a few years of features?

Too many more iterations of this and you'll be back to two programming languages again and web developers heads will explode from having to learn two things instead of one things.



It's been "the same javascript everywhere" mostly due to the ECMAScript group kinda stalling for the past 15 years. The stabilisation created through that has been useful, but the plan is to transition the spec onto a one-year update cycle.

That means that going forward we'll likely have more feature mismatch between engines, making backward compatibility compilers pretty important.

I'm not entirely sure if that's good or not.


Chrome (logically) already supports features of the new JS spec that 'only now' get put into node. With automatic updates for browser being the trend currently I also think that it is now easier to keep the server and browser support for JS in sync.


Not necessarily. I don't think the v8 team really consider the Node project so breaking changes in v8 take some time to get merged into Node/io.js. This is the reason that arrow functions are only shipping now when v8 marked them complete a while back. AFAIK Node is somewhere around 3+ months behind Chrome.


This is not really accurate. Arrow functions shipped in Chrome on Tuesday (Sep 1) with Chrome 45 (V8 4.5).


Gotcha. I guess marking them "shipped" just puts them into canary? That was done a while back.

https://code.google.com/p/v8/issues/detail?id=2700


V8 has had arrow functions for a long time, but until recently they were not fully spec compliant. That is also why iojs put them behind a flag (separate from the flag that enabled stable harmony features).


Yeah, 'ship' means different things in different contexts. In the context of your original comment, node stable is getting arrow functions within a week of Chrome stable getting them.

In general, io.js has been very good at picking up stable V8 soon after it ships in Chrome. The exception was V8 4.3, which was not picked up because of API compatibility issues.

This is not a problem for Chrome because chrome doesn't expose the V8 C++ API to large body of third party module writers like Node does. It takes time to deal with some API changes.


Sadly, it's inevitable. But at least with things like Babel we can still write the same code for browsers, just with an extra transpile step.


with babel you can use the latest js everywhere.


Latest JavaScript that can be transpiled to ES5 anyway.


Except for symbols and Object.observe.

Well, you can emulate those in ES5 but it's just not the same.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: