8 ms·
The Final ES2015 (ES6) Draft
- VeejayRampay 11y agoIf someone in the know could give me a rough estimate of "When can I expect to be using ES6 to develop applications (at least for modern browsers)?", that'd be nice. And I'm not talking Babel or any other tools like that, I'm talking straight up ES6.
- atirip 11y agoWhy? What is the thing you can do in ES6 that you can't in ES5? Features that affect execution speed or real memory consumption positively. Leave hipster features out.
- tragic 11y agoThat's an extraordinarily reductive view of improvements to a programming language. A basic example: cleaner syntax for anonymous functions will have (presumably) almost no effect on speed/memory either which way, but will make code more readable. Which is not a 'hipster' concern.
- coev 11y agoAlso: "this" is bound for you in fat arrow functions without having to resort to function.prototype.bind or "var that = this;" trickery. That's an issue I've seen bite many people before and it'll be nice to have an easy way to avoid that.
- TazeTSchnitzel 11y agoIt's the difference between var map = function (f) { return function (list) { return list.map(f); }; }; and const map = f => list => list.map(f);
- VeejayRampay 11y agoUpvoted your comment so that everyone can see it. ES6 has template strings, destructuring assignment, Map and Set data structures (and more). While you're right and it is not NEEDED, this is something that dramatically improves on the weakest aspects of ECMASscript. Based on your comment, it feels like no addition is ever a good addition if you can express it with the building bricks you already have. With such a way of seeing things, we'd all be coding with assembly language, cause nothing really affects speed or memory consumption for the better.
- atirip 11y agoNo-no, there has been lot of features added to Javascript (i started writing it around 2003) that were not shimmable in earlier versions.
- etimberg 11y agoMap and set are much nicer in ES6 as built in objects.
- btd 11y agoimo map and set useless. Real advantage of maps only that you can use any type of keys, but really why not convenrt them to string represntation and put to simple object? Map .has method uses === for object search. For set the same, just use object with keys and dummy values.
- realistschuckle 11y agoProxies. You can't shim in the Proxy object. Ain't no hipster feature there.
- spion 11y agoYou can't even transpile it without massively different output from the transpiler, which is a bit bad.
- karoladamiec 11y agoOne reason to rule them all: Generator functions. Why it is a big deal one might ask. It is the BIGGEST deal in history of Javascript in my book because it allows you to do async that looks sync. No more callback hell. It is the single most important feature, as it eliminates async issues completely. And EVERYTHING in js is async. But in reality, you want to drop into async only sometimes. Now you are forced into it 100% time, even when you need the result of async call to decide what to do next. It gets tricky really fast.
- CoryG89 11y agoI guess to each their own then. I really just want the new syntax features, modules, classes, const,maybe template strings will be nice too. I work with async ES5 code all the time and I don't have many problems with async when using promises. I know promises are also coming with ES6, but almost everyone uses them today in ES5.
- karoladamiec 11y agoWell promises help. And then they stop :). Stop helping. They just break under the weight. If you have promise chain that gets too long, you will feel the pain. The whole thing is, when some IO returns 1 or 2. And your next step is to do a or b depending on the reply. How is your neat promise chain looking now? Then repeat 100 times :( Not even mentioning error handling... and stack traces. So i do agree that it depends what you do a lot. Maybe there are domains where it is not important... but i still need to see that one. And i will take blocking IO with try/catch 10 times out of 10. Even when it is not critical. It is just nicer and easier to reason about.
- babby 11y agorequire('bluebird').coroutine function*() {} Promises + Generators = The sweet spot. Check out https://www.npmjs.com/package/coroutiner https://www.npmjs.com/package/coroutiner to make it stupid-easy to coroutine your entire app.
- 11y ago
- madeofpalk 11y agoNew Safari (in iOS 9 and next OS X) will support most of the ES 6 features. I guess it depends on what you're developing for.
- robin_reala 11y agoEven the latest Webkit is only on 50% on Kangax’s support table. I suppose that’s better than latest Chrome (45%) but much worse than latest IE (63%) or latest Firefox (66%).
- Klathmon 11y agoTo be completely fair, most of the Chrome ES6 features are disabled via command line flag for now. When they are ready (and stable) they will all be enabled at once, and the vast majority of people will get the update within a few weeks at most.
- zghst 11y agoIE is at 14%. Microsoft Edge is at 63% and it will be updated in 6 week sprints like Chrome supposedly. Unlike Google or Firefox or Microsoft (who is now shamed into competing) there is no incentive for Apple to be aggressive with their ES6 implementation. Safari will remain handicapped for another year, while the other browsers slowly but surely get full support. At least we only have to wait a year (Like we did for most old CSS properties to become unprefixed).
- madeofpalk 11y agoWhat incentive does Google or Firefox have for adopting ES6? How is it different to Apple? But I agree with the sentiment - when every other browser is on multiple releases a year (Chrome at a release every 6 weeks!!!), it really is archaic when Safari is releasing only once a year. I would love to see WebKit updates to Safari in the iOS and OS X point releases. I guess it comes down to Apple wanting to remain 'API stable' within each major OS release.
- 11y ago
- tragic 11y agoA good while yet, I'd expect; a lot depends on Windows 10 uptake. The browser-formerly-known-as-IE is currently running ahead of Chrome and FF on ES6 implementation, but if everyone sticks with Win7 for the next half decade it won't amount to much. But seriously: use Babel.
- VeejayRampay 11y agoOh absolutely Babel is awesome, just wondering.
- cabirum 11y agoThat's why MS gives out Win10 for free: there are zero reasons to stick with 7.
- gmac 11y agoHere are two big reasons: (1) The IT department controls what's on your PC. (2) You have no idea how computers work.
- monk_e_boy 11y agoYep, there are a lot of strange peripherals attached to computers that are no longer supported. Win XP and 7 will be around for a while yet. Out local hospital is still using IE7 - that's a lot of PCs that aren't going to get upgraded any time soon (funding cuts.)
- Klathmon 11y agoIt was my understanding that it wasn't that those things weren't "not supported" but that the drivers will no longer be included with the base install. Stuff like off-the-wall scsi drivers, or floppy drivers, or serial port mouse support. You can still download and install the drivers for those things, but they won't be there right away.
- 11y ago
- deleted 11y ago[deleted]
- zghst 11y agoI am confident full ES6 support will be really solid by March 2017. However, the community is moving incredibly fast, some companies are already using ES7 / ES2016 features! In perspective, transpilers aren't so bad, especially Babel, who's differentiating feature from the start was readable output code. Today, if targeting modern browsers you can use Maps and Sets. With polyfills[1] you can use the new Array functions, Promises, Symbols, full JS collections, iterators, etc. [1] https://github.com/zloirock/core-js https://github.com/zloirock/core-js
- sirsuki 11y agoThe Final ES1015 (ES6) Draft Am I the only one noticing the oxymoron there?
- netcraft 11y agoI believe thats exactly what it is - the latest revision of the document that will go on to be voted on and accepted. >This draft has been submitted to the Ecma General Assembly members for their review and consideration. The GA will vote on approving it as a Ecma standard at their June 2015 meeting. >Assuming GA approval, it will still be possible to make very minor editorial corrections in the published version.
- coldtea 11y agoNo. "Final Draft" is a very standard term in books/scripts/standards/legal docuemnts/etc (actually there's even a scriptwriting app bearing that name). It's the final draft as in "the last in the series of draft revisions", meaning than after that the actual standard document is going to be voted / published -- at worse with very minor last minute corrections.
- bshimmin 11y agoI get documents from designers with names like "FINAL homepage v23 latest updated FINAL_2 (3).psd" all the time...
- M8 11y agoExpect the Final Final pre-Release post-Draft. ES6 will never get released.
- sago 11y agoIt is so good to see ES moving again, after a decade in the wilderness. EC5 wasn't an aberration, and there are lots of productivity improvements in this and coming in ES7. A big thankyou and congratulations to the people who worked so hard on this. The work of a standardisation committees is often a thankless task. On a slightly churlish note, the typography / graphic design of the standardisation document is absolutely horrid. From the color choices, to the (many) fonts, to the early 90s type treatment to the fake laid paper texture on the cover to inconsistent spacing inside. Shiver. Okay, superficial, but only slightly so. I genuinely think that type and book design is important for communication.
- pcwalton 11y agoIIRC, the particular formatting in the document is required by ECMA and the ES6 committee can't do much about it.
- bzbarsky 11y agoThe right answer to the typography question is probably to just use the HTML version at http://people.mozilla.org/~jorendorff/es6-draft.html http://people.mozilla.org/~jorendorff/es6-draft.html for all practical purposes.