6 ms·
Most excited about v8 4.5. Native support for arrow functions and stuff like Array.from really makes the dev experience feel so much smoother.
by rakk 11y ago
Most excited about v8 4.5. Native support for arrow functions and stuff like Array.from really makes the dev experience feel so much smoother.
- mattkrea 11y agoThis is huge. I've been using RxJS lately and arrow functions will make this 100x better.
- seiji 11y agoI 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.
- deleted 11y ago[deleted]
- sciolistse 11y agoIt'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.
- rakk 11y agoChrome (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.
- mattkrea 11y agoNot 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.
- ofrobots 11y agoThis is not really accurate. Arrow functions shipped in Chrome on Tuesday (Sep 1) with Chrome 45 (V8 4.5).
- mattkrea 11y agoGotcha. 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 https://code.google.com/p/v8/issues/detail?id=2700
- Arnavion 11y agoV8 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).
- ofrobots 11y agoYeah, '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.
- findjashua 11y agowith babel you can use the latest js everywhere.
- Killswitch 11y agoLatest JavaScript that can be transpiled to ES5 anyway.
- pluma 11y agoExcept for symbols and Object.observe. Well, you can emulate those in ES5 but it's just not the same.
- untog 11y agoSadly, 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.
- paperwork 11y agoDoesn't this include the new class syntax? If so, will the standard libraries change as well to use the new classes?
- Killswitch 11y agoYes, classes are stable in V8 4.5 so Node.js 4.0 will have classes without runtime flags.