Live data from Hacker News

ES6, ES7, and beyond

v8project.blogspot.com

71–75 of 75 posts

Re: ES6, ES7, and beyond

#71

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…

> I need it.

Need is a strong word.

Re: ES6, ES7, and beyond

#72

Earlier quoted context omitted.

I'd think there are plenty of reasons to give software an air of "out-of-date"-ness. In this particular example, its a stigma to browser developers if it takes them until 2023 to implement ES2015. It's a common thing in language standards to version by the year the standard was ratified, especially for ANSI languages such as C and C++, but there's a long history of it in language design including the ur-example off t…

MySQL still hasn't implemented "with statements" and I miss them frequently when working with MySQL. The fact that "with statements" were added to the SQL standard in 1999 doesn't seem to bother anybody though, and MySQL continues to gain popularity.

I've been Team PostgreSQL for a long time in the FLOSS DB Wars, so take this with a grain of salt, but that MySQL hasn't managed to implement "ancient" standards certainly has bothered me over the years and there are certainly plenty of other people on Team PostgreSQL that have been pointing this stuff out for in some cases decades. So yes, shame on MySQL for failing SQL99 (and heck, shame on them for failing SQL86 in their basic [lack of] ACID compliance in their default DB storage for far too many years).

So yes, this certainly feeds my point that standards years can be useful to point out the quirky failings of software by potentially adding to their shame. It's 2016, are you using an SQL-1986-compliant database?

Re: ES6, ES7, and beyond

#73

Earlier quoted context omitted.

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…

> I need it. Need is a strong word.

In this case, "need" refers to the "if (x === undefined) { x = y }" pattern. Which is absolutely a need when implementing functions with variable arity.

If I need that pattern, I'd rather write it declaratively than imperatively. :)

Re: ES6, ES7, and beyond

#74

Earlier quoted context omitted.

> I need it. Need is a strong word.

In this case, "need" refers to the "if (x === undefined) { x = y }" pattern. Which is absolutely a need when implementing functions with variable arity. If I need that pattern, I'd rather write it declaratively than imperatively. :)

Variable arity is exactly the thing to which I refer. It isn't needed.

Re: ES6, ES7, and beyond

#75

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…

Technically, default arguments don't quite, purely, desugar exactly into that -- there are some scoping complexities to them as well (possibly only for functions having strict mode code), the details of which I haven't fully internalized. Your observation is otherwise correct with a little bit of handwaving. :-)
Post reply on HN