Live data from Hacker News

WebKit is now 100% ES6 complete

twitter.com

101–110 of 119 posts

Re: WebKit is now 100% ES6 complete

#101
post #13

Is anyone using Safari Technical Preview as their main Browser? I was hesitant to use it, but I've heard a few people say that it's stable.

I've been using it as my main browser since release. I've noticed two things:

1) With gifs, Safari TP will loop the first few frames (or whatever loads quickly) and loop that, whilst the remaining frames load, but then never update to looping the entire gif once completely downloaded; refreshing doesn't correct it, just focussing the address bar and hitting to load the gif from cache.

2) Math.random() returns the same result the first two calls on page load.

Re: WebKit is now 100% ES6 complete

#102
If I had to choose between having all the ES6 features except modules, versus having ES6 modules without all the other ES6 features, I would choose the latter. Sure, I'm biased, because I'm working on a huge single-page app with gazillion lines of JS code...

Re: WebKit is now 100% ES6 complete

#103
post #102

If I had to choose between having all the ES6 features except modules, versus having ES6 modules without all the other ES6 features, I would choose the latter. Sure, I'm biased, because I'm working on a huge single-page app with gazillion lines of JS code...

As far as I know modules aren't a ES6 feature.

Edit: To clarify, I want them standardized more than anything else, but as far as I know ES6 only specified the syntax

Re: WebKit is now 100% ES6 complete

#104
post #60

Yet only 98% ES5 compliant: https://kangax.github.io/compat-table/es5/ No browser is at 100%, BTW. Waiting for a WATWG JavaScript standard that removes these parts from the spec...

Are you aware of https://javascript.spec.whatwg.org/ ? :) Thankfully that spec is almost obsolete as TC39 has moved much of it into the main spec over time. It used to be the only place important de-facto language features like __(define|lookup)(Getter|Setter)__, or String.prototype.blink, or Function.prototype.{arguments,caller} were specified. You can see the history of it getting smaller in https://github.com/what…

IMHO, we should switch from that mess to common repository of JS libraries (CJSAN), which can be referred using tags like . Such libraries will act as polyfills for an API, while browsers will be able to provide optimized versions of these libraries.

I.e. instead of waiting for ecma262 to be implemented by all browsers, scripts can just load common polyfill, which then can be overridden by browser later:

   

Re: WebKit is now 100% ES6 complete

#105
post #37

So, today I'm using babel to transpile my code to es5. Anyone know of any good tooling to use transpiled code for older browsers and es6 for newer?

What you are describing is serving up different assets based on user agent detection. The "tool" in this case would be the application responsible for serving it, most likely either your custom server-side web app code, or your web server itself. You should continue to use the transpilers for some time though. It has been reported that many ES6 features run quite a bit faster as transpiled ES5 than natively as ES6.

It should be possible to do so client-side by having a bit of loading / bootstrapping JS that does the feature detection.

Re: WebKit is now 100% ES6 complete

#106
post #99

tfw when "complete" has degrees. sigh. I'm 99% super confident that this is an almost optimal solution.

Of course it does. If you're working on a task that will take hundreds of hours and your boss asks how far along you are, is your only possible response either "finished" or "not finished"?

And even when you think it's "finished", is that really true? I'm pretty sure no software is ever 100% finished / to spec, esp when the spec is ambiguous like most specs are.

Re: WebKit is now 100% ES6 complete

#107
post #102

If I had to choose between having all the ES6 features except modules, versus having ES6 modules without all the other ES6 features, I would choose the latter. Sure, I'm biased, because I'm working on a huge single-page app with gazillion lines of JS code...

Although I'm also looking forward to ES6 modules, I've completely forgotten about the issue since I started using Browserify. It "just works".

Re: WebKit is now 100% ES6 complete

#108
post #37

Earlier quoted context omitted.

What you are describing is serving up different assets based on user agent detection. The "tool" in this case would be the application responsible for serving it, most likely either your custom server-side web app code, or your web server itself. You should continue to use the transpilers for some time though. It has been reported that many ES6 features run quite a bit faster as transpiled ES5 than natively as ES6.

It should be possible to do so client-side by having a bit of loading / bootstrapping JS that does the feature detection.

While technically feasible that is a low quality solution for the sake of keeping the solution space in JavaScript. JavaScript-based feature detection is one thing but conditionally loading the entire application is another. It is wholly pointless if you are already transpiling to ES5, and as mentioned numerous times, a performance problem in at least the short term.

Re: WebKit is now 100% ES6 complete

#109
post #60

Yet only 98% ES5 compliant: https://kangax.github.io/compat-table/es5/ No browser is at 100%, BTW. Waiting for a WATWG JavaScript standard that removes these parts from the spec...

Are you aware of https://javascript.spec.whatwg.org/ ? :) Thankfully that spec is almost obsolete as TC39 has moved much of it into the main spec over time. It used to be the only place important de-facto language features like __(define|lookup)(Getter|Setter)__, or String.prototype.blink, or Function.prototype.{arguments,caller} were specified. You can see the history of it getting smaller in https://github.com/what…

Maybe I should have said a WATWG YavaScript standard...

I didn't know the standard existed.

Generally, agree with the "let's put back every piece of dung in place after paving the cowpath" approach the WHATWG follows. Anosmic folks come to rely on the reduced friction coefficient...

I suppose that the Date.parse stuff was updated between ES5 and the living stabdard.

Re: WebKit is now 100% ES6 complete

#110
post #60

Yet only 98% ES5 compliant: https://kangax.github.io/compat-table/es5/ No browser is at 100%, BTW. Waiting for a WATWG JavaScript standard that removes these parts from the spec...

You can pretty much consider Opera 12.10 100%. The only thing missing is "parseInt ignores leading zeros", which is such a minor issue (octal bugs I assume).
Post reply on HN