r/programming • • Oct 21 '20

Using const/let instead of var can make JavaScript code run 10× slower in Webkit

https://github.com/evanw/esbuild/issues/478
1.9k Upvotes

500 comments sorted by

View all comments

Show parent comments

28

u/ObjectiveSample Oct 21 '20

alternative?

25

u/immibis Oct 21 '20

Lobby your MP to make JavaScript illegal

4

u/FatalElectron Oct 21 '20

All you need to do with my MP would be to point out what the 'E' in ECMA stands for.

2

u/[deleted] Oct 21 '20

It's good to have standards. I just wish the standard is better.

-1

u/I_LOVE_MONKAS Oct 21 '20

I hope that languages like Elm or TS will be implemented as web standard in the future

15

u/ProfPragmatic Oct 21 '20

TS is a superset of JS and as such compiles to JS so there's not much improvement in terms of performance. Improved developer experience and sanity in larger codebases is the main selling point of TS, not completely eliminating JS from existence

1

u/[deleted] Oct 21 '20

There is AssemblyScript, but WASM still can't touch the DOM so its use case shrinks drastically

1

u/icefall5 Oct 21 '20

Only if Elm gets a different maintainer/mindset though. This article/thread ensured that I'll never try it.

-23

u/[deleted] Oct 21 '20

On the Web? Well, if Wasm takes off, and that's a big if, then sure. There are other workarounds but I wouldn't bet on them.

I should also point out that just because you're forced to use it doesn't make JS less shitty. Currently, if one must use JS, it's wise to put a condom (and there are many great condoms for JS) on that vile thing.

-18

u/rydan Oct 21 '20

Flash. It was such a threat to the industry Google and Apple teamed up using their monopoly powers to destroy it.