Live data from Hacker News

JSC loves ES6

webkit.org

51–60 of 191 posts

Re: JSC loves ES6

#51
post #6

Another great reason to migrate Electron to WebKit. With WebKit and JSC Electron will be faster and will use a zero amount of RAM and battery!

We shouldn't be migrating Electron to anything… we should be getting rid of it. Electron is a cop-out for mediocre dev teams to make mediocre desktop apps. The result is a world where we run apps like Spotify and Slack are the main battery-killers because their engineering teams were too lazy to make a real native app.

Re: JSC loves ES6

#52
post #14
post #9

Earlier quoted context omitted.

Doesn't Electrino basically try this?

Currently it looks like Electrino only supports macOS. Doesn't it sort of defeat one of the purposes of using a web-based framework for desktop apps if it's not even cross-platform?

Sure thing, but I thought the idea was to use Edge on Windows?

Re: JSC loves ES6

#53
post #21

Earlier quoted context omitted.

Unfortunately it's the name we're stuck with though, and it makes a lot more sense because ECMA releases are yearly. Not judging, but if high profile articles and browser vendors started addressing it correctly we wouldnt have any issues migrating, more syllables or not.

I'm a touch confused...are you saying that if everyone used the year-based nomenclature, the inconsistent support would go away? Today in 2017 I have some ES6/ES2015 features I can use as well as some ES7/ES2016 features, but there are also other ES6/ES2015 that I can't count on being supported, and quite a few ES7/ES2016 features I can't count on. How are these problems alleviated if we change the name we use? Or ha…

Just talking about the name.

You can see how this is confusing, here's a recent one just from today by Craig Federighi https://twitter.com/feross/status/871839072590979076

Re: JSC loves ES6

#54
post #33

It seems weird to focus so much on es2015 features, when so many of them are polyfillable (not optimal, sure, but still) when there is such uneven support for DOM (and related browser) API features in safari. I mean, where are service workers? Give me a nice, cross-platform way to handle offline-first and I'll be happy. But hey, it isn't like there's some kind of browser monopoly on iOS or anything, like there was in…

Service workers are an anathema to everything Apple is trying to achieve with Safari and I would be shocked if it ever gets included. Their focus is on improving battery life, having a great user experience and maintaining a high level of privacy and security. Service workers are awful for all three. For example look at what you have to do to see running service workers:

Developer Tools > Application > Service Workers

chrome://inspect/#service-workers

If there was a rogue web site launching service workers to do something nefarious how would I know diagnose what's happening ? How would my grandmother ? Where is the transparency the web is supposed to provide ?

Re: JSC loves ES6

#55

I’ve been staying away from most new ES6 features because when I tested them a year ago (either transpiled or with native support) they were slow as molasses in every browser I tried. Hopefully having some better benchmarks gets Firefox and Chrome developers to also get to work on this.

Native ES6 is faster in WebKit than polyfill/transpiled.

Yes, but sticking to old-school Javascript features was dramatically faster than either.

Re: JSC loves ES6

#56

I’ve been staying away from most new ES6 features because when I tested them a year ago (either transpiled or with native support) they were slow as molasses in every browser I tried. Hopefully having some better benchmarks gets Firefox and Chrome developers to also get to work on this.

Do you mean that you saw actual differences when using Javascript in a normal website? Or that they were slower than the alternatives in a synthetic benchmark? It would be really surprising that those were the performance bottlenecks.

[deleted]

Re: JSC loves ES6

#58

I’ve been staying away from most new ES6 features because when I tested them a year ago (either transpiled or with native support) they were slow as molasses in every browser I tried. Hopefully having some better benchmarks gets Firefox and Chrome developers to also get to work on this.

Pretty much the only thing I've had problems with is generators. Regenerator runtime is so slow. Especially when making a bunch of calls with async/await

Re: JSC loves ES6

#59
post #33

It seems weird to focus so much on es2015 features, when so many of them are polyfillable (not optimal, sure, but still) when there is such uneven support for DOM (and related browser) API features in safari. I mean, where are service workers? Give me a nice, cross-platform way to handle offline-first and I'll be happy. But hey, it isn't like there's some kind of browser monopoly on iOS or anything, like there was in…

> I mean, where are service workers?

Every discussion about anything in Safari on HN, even if not at all related, for the last year or two has included multiple people complaining about the lack of WebRTC.

Now it's here and there is a new complaint /s

I agree with threeseed that it probwont come and frankly I don't see why I'd want it (or web notification, or even WebRTC). They only seem to support the use case of replacing real apps with webpages which I don't want to do and makes no sense to me as an end user (I understand the freedom motivations).

Re: JSC loves ES6

#60

Earlier quoted context omitted.

Native ES6 is faster in WebKit than polyfill/transpiled.

Yes, but sticking to old-school Javascript features was dramatically faster than either.

Not necessarily. Map/Set is a counterexample. There’s no substitute for the JIT knowing how to reason about the internal aliasing properties of your hash table implementation.

We’ll keep working on more optimizations for ES-6 so there will be more counter examples.

Post reply on HN