Earlier quoted context omitted.
I thought IE11 and earlier have none of these features right? And you can't run Edge on windows 7 right? And aren't more than 50% of windows sill Windows 7? And in't windows still 90% of the market? I was thinking these features are still 5+ years away unless you are prepared to actually ask your users to switch to Chrome.
Transformation of most ES6 features into functionally identical, backwards-compatible ES5 is trivial, and automated tools exist to do that, so you absolutely can use them today. For example, default arguments are purely syntactic sugar for `if (arg === undefined) { arg = x; }` in the first line of a function. Still, I'd much rather write ES6's declarative `function foo(arg=x) { }` syntax rather than imperatively impl…
ES6, ES7, and beyond
61–70 of 75 posts
Re: ES6, ES7, and beyond
#62Earlier quoted context omitted.
I thought IE11 and earlier have none of these features right? And you can't run Edge on windows 7 right? And aren't more than 50% of windows sill Windows 7? And in't windows still 90% of the market? I was thinking these features are still 5+ years away unless you are prepared to actually ask your users to switch to Chrome.
> windows still 90% of the market Of all the people on the web, or target audience of your website, or what market?
Re: ES6, ES7, and beyond
#63Earlier quoted context omitted.
THAT is truly disappointing. Of all the new features, async/await is possibly the most critical for improving readability of code. It's even more of a step forward than Promises was.
It's not really that big of an issue for it to still be in the standards track, async/await can be emulated using ES6 generators - in fact, if you target ES6 with the TypeScript compiler it will just implement a generator for you to handle the async stuff. I'm not certain if babel or any of the other transpilers do it yet, but it's not that much of a challenge. Of course, it will be nice to not need transpilers and I…
https://www.npmjs.com/package/babel-plugin-transform-async-t...
Re: ES6, ES7, and beyond
#64Earlier quoted context omitted.
I would really be interested to know why we need a special syntax for tail calls. (genuinely curious) I'm from Lua originally and we've had tail calls forever... why would you point them out? It should be obvious: return wat()
I'm not on TC39, but I sit next to and work closely with people who are, and my understanding (confirmed by this article) is that the primary concern is about stack traces of existing code, specifically code with function calls in tail position. With implicit tail call elimination, those stack traces will change in non-trivial ways that could affect debugging processes or break existing tools. I've also heard some co…
Re: ES6, ES7, and beyond
#65PLEASE don't do the awkward .mjs thing. I and prob most devs will simply not respect it.
Re: ES6, ES7, and beyond
#66PLEASE don't do the awkward .mjs thing. I and prob most devs will simply not respect it.
.es sounds good to me. Seems like a good fit for EcmaScript . It might even help finally renaming the language, so that tech recruiters confuse it with something else ;)
Although it's a cute suggestion.
Re: ES6, ES7, and beyond
#67Earlier quoted context omitted.
.es sounds good to me. Seems like a good fit for EcmaScript . It might even help finally renaming the language, so that tech recruiters confuse it with something else ;)
That would be incorrect though, there are other implementations of the ES specification that are not JavaScript (UnityScript for example). Although it's a cute suggestion.
Re: ES6, ES7, and beyond
#68(TC39 and Mozilla member here.) FWIW, this: For these reasons, the V8 team, along with TC39 committee members from Mozilla and Microsoft, strongly support denoting proper tail calls by special syntax. is misrepresentative of the state of consensus and frankly premature. In particular, while I won't try to speak for all of my colleagues (we do not pre-determine an official Mozilla position in advance of standards disc…
I would really be interested to know why we need a special syntax for tail calls. (genuinely curious) I'm from Lua originally and we've had tail calls forever... why would you point them out? It should be obvious: return wat()
Re: ES6, ES7, and beyond
#69Re: ES6, ES7, and beyond
#70Earlier quoted context omitted.
THAT is truly disappointing. Of all the new features, async/await is possibly the most critical for improving readability of code. It's even more of a step forward than Promises was.
It's not really that big of an issue for it to still be in the standards track, async/await can be emulated using ES6 generators - in fact, if you target ES6 with the TypeScript compiler it will just implement a generator for you to handle the async stuff. I'm not certain if babel or any of the other transpilers do it yet, but it's not that much of a challenge. Of course, it will be nice to not need transpilers and I…
But I'm hearing that both the Babel and TypeScript implementations leave a lot to be desired with performance. Not so bad that it gave my use case a problem, but I use NodeJS, in part, for performance.
I'm also targeting browsers (and hybrid apps) with some code, and I've recently jumped from Babel/ES6 to TypeScript, so I can get the support via generators, but again I'm hearing of performance issues.
Getting first class optimized browser support is where I'll feel it's truly awesome.