Live data from Hacker News

At some point, JavaScript got good

jonbeebe.net

1–10 of 24 posts

Re: At some point, JavaScript got good

#4
I read the entire article based on the misconception that the title was "At some point, JavaScript not good", which I thought was an amusing title, and also a pithy way to express what I've felt for a long time. So I read and read, expecting to get to the part where the author explains why JavaScript is not good at some point. But it never came.

I spent four years building an in-browser digital ad auction manager in JavaScript that truly bent my mind and that also delivered millions of dollars in ad revenue. You would think I would come away from that experience thinking "I know JavaScript", but I instead I came away thinking "That was hell, I never want to work in JavaScript again".

I worked on that project over the time period when ES6 was introduced and also later transitioned everything to TypeScript. I agree that things got better, but I still think that JavaScript is pathetic.

Re: At some point, JavaScript got good

#6

I got less of a "Javascript got good", and more of a "Javascript got less unbearably bad" from this article. It is still a travesty that Javascript. alone is the language of the web (sans transpilation).

It is no longer. WebAssembly is now - with reference types and GC - fully usable.

Re: At some point, JavaScript got good

#7
Block scoping has been -huge- for me.

ES6 'let' has very similar semantics to perl's 'my' and the absence of an equivalent elsewhere has always made me feel like I was missing a limb.

There's currently a proposal (which I think looks likely to succeed) to add a 'do BLOCK' syntax to ES6 as well, which is (now I get sane scoping) the top perl feature I miss All The Time when writing JS, and I can't wait.

(in the cases of both ruby and python the function scoping seems to be a deliberate choice rather than an omission and I just Do Not Understand how it doesn't bother people more)

Re: At some point, JavaScript got good

#8
Better than before is not necessarily good. There are still lots of warts and gotchas.

In that regard JavaScript is a lot like C++. You can write pretty good C++ if you know what you are doing but the old ways are still possible and haunt you in legacy code.

Re: At some point, JavaScript got good

#9

I got less of a "Javascript got good", and more of a "Javascript got less unbearably bad" from this article. It is still a travesty that Javascript. alone is the language of the web (sans transpilation).

It is no longer. WebAssembly is now - with reference types and GC - fully usable.

Not really; DOM API still absent, calling between modules has high overhead, etc.

It's close though.

Reducing module to module call overhead is important for being able to split larger WASM applications without needing to do so by performance boundary rather than logical or other optimised boundary calc. Doing this properly probably means a proper dynamic linking approach or something but I'm no expert.

DOM API is self explanatory. The whole point of the web is the unified presentation layer but being forced to talk to it via a bridge sucks. Once it's done then WASM/DOM becomes GTK on steroids.

Re: At some point, JavaScript got good

#10
This is something I have always found interesting. Most people cannot write JavaScript but think they can because the syntax looks familiar and then complain when the result is shit.

There is some hidden assumption this language should reflect some other language a given programmer is formerly trained in and then disappointed when JavaScript is not their favorite pet language. Further interesting is that there is no interest or investment in formal training in JavaScript, just assumptions and failed dreams.

In that spirit when people say getting good I usually take that to mean looking more like Java, C#, or whatever.

Post reply on HN