Live data from Hacker News

At some point, JavaScript got good

jonbeebe.net

21–24 of 24 posts

Re: At some point, JavaScript got good

#22
post #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.

That's a pretty apt comparison I'd say.

However, with JavaScript you have to avoid the old/outdated language constructs, and some warts need to remain, since browsers still need to support old websites. Perhaps in the future we can specify "ECMAScript version" (similar to perl) so old stuff can be thrown away and the VM can optimize without having to worry as much about backwards compatibility.

Re: At some point, JavaScript got good

#23

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…

Adding to this, the last few occasions I have been told that js sucks has either been about some browser security mechanisms (think cors and iframe sandboxing) and red-green async functions.

Re: At some point, JavaScript got good

#24
Literally 3 months back I would have disagreed with this article. Since that time I’ve been working on contract for a startup coding their backend from scratch in Typescript. The CTO/advisor insisted on nodejs because that’s what he’s familiar with. When I started I didn’t know quite enough about modern Javascript, didn’t know anything about Typescript, about mongoose or deploying and scaling node apps on the cloud. About the only thing in my favour was that this is still a C style language with familiar syntax.

I decided to go with Nestjs since it sets up somethings for you out of the gate. I’m still not fully happy with that decision, but it is what it is. Btw, I don’t even know how to write tests for any of the code I wrote. I’m still figuring that out. We just needed quick and dirty code that we can test in real world. But we’re happy with this, admittedly shitty, backend for now while we have been testing it with our initial audience.

So now I’m leaving heavily on the author’s side that the modern JS ecosystem and the language itself is pretty good. It still requires quite a bit of sophistication to understand what is going on, but it isn’t a nightmare inducing mess that popular programming culture makes it out to be.

I don’t think a complete newbie would have been able to do what I’ve done over that last few months. You still need to check a lot of your expectations of the language and be careful. But quite a lot about this ecosystem and the tooling available is undeniably impressive.

I would just advise people not to fall for the “backend elitist” mentality that is so prevalent in the discourse and actually try things out for themselves.

Post reply on HN