Live data from Hacker News

We Should Stop Using JavaScript According to Douglas Crockford (2023)

old.reddit.com

41–50 of 77 posts

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#41
Basically the entire argument boils down to: Javascript has some technical cruft, so we should tear everything down so we can start over with a clean slate.

This is an astoundingly simplistic take from someone as reputable as Douglas Crockford. Every widely used programming language has some cruft. If we stopped using all languages that had cruft we wouldn't be using any languages at all.

I also disagree with the premise that new languages cannot get any adoption. There are lots of great ones, that are seeing some adoption, like Go, Dart, Kotlin, and Rust. It's true that development seems to slow down, but that's due to the software engineering maturing: older languages have larger codebases and more libraries written for them, which makes them hard to displace. And the standard for a new language is much higher: people expect solid package management, generics, OOP features, garbage collection, and a ton of tooling. It takes a lot more development effort just to catch up with the status quo.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#43
The entire history of programming languages has been:

- Create a simplistic programming language that looks easy to learn and use but ends up being deceptively complex to apply to real world problems

- Fix those problems with a more rigorous approach that's hard to learn but stands up to real pressure

- Ignore all the lessons learned and create another simplistic programming language that looks easy to learn and use but ends up being deceptively complex to apply to real world problems

If we all agree to stop using Javascript and replace it with something that doesn't have Javascript's baggage I have full confidence that somebody will invent a new "simple" approach on top of that approach that will have all the same oversights Javascript had.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#44

In this context, describing Crockford as “the inventor of JSON” is doing him a disservice. I’d argue he’s one of the key people who made JS a respectable language through “the good parts”. It’s not necessarily the specific suggestions that are relevant but he was responsible for making people recognize that yes, JS is highly flawed, and yet, you can use it as effectively as any of the other popular OOP languages at t…

It's a big deal if you're saying Doug Crockford still has his finger in the pie, or that he still has deep connections to ecosystem, browser, or JS politics, and that a needle is about to cross a decision boundary. If you lead with that then that's all the credibility you need to say that Doug Crockford's position on JS is a big deal. IMO the WASM story might end up expanding to swallow JS, but Doug Crockford won't b…

I don’t think Crockford will be leading the movement away from JS.

But he was among the people most responsible for the movement to JS so for him to say JS has run its course is important even if he is wrong.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#47

Earlier quoted context omitted.

The `new Go();` is doing all the JS that you claim to not be doing.

but all my logic that changes the DOM is in go. What am I missing?

Your logic still needs to run JS code to change the DOM. You are indirectly relying on JS despite using WASM.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#48

I think I agree with everything he's saying. There have been arguments against javascript for a long time. If anything though, I think they've diminished over time as the language has improved. I still don't really like it. But there still isn't a technology that can do what js does. That is, distribute apps in a truly cross-platform, zero-install way. So people will keep using it at least as long as that's true. I'm…

The difference is that the “_comment” as a processing directive is that the JS value and the raw file reflect the same data, where the comment would be invisible at runtime. In this way “_comment” isn’t a workaround, it’s the reflection of the reason the decision was made in the first place (no difference between value and raw).

This is exactly right. Comments in JSON would have killed it.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#49
post #47

Earlier quoted context omitted.

but all my logic that changes the DOM is in go. What am I missing?

Your logic still needs to run JS code to change the DOM. You are indirectly relying on JS despite using WASM.

ok but I have all the advantages of go. I can code my go in a modern way and escape JS traps despite the end result is still using js.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#50

Earlier quoted context omitted.

so what's the big problem with calling instantiateStreaming? Explain it to me like i'm 5

instantiateStreaming is not the problem; the problem is that JS code is necessary (via that function or another) to execute WASM, and JS is necessary to call back from WASM into browser APIs. Because of that, WASM in the browser is, at present, effectively a JavaScript extension language, and it cannot meet the goals discussed by Crockford in TFA. This hybrid approach that requires JS both at bootstrap and browser-AP…

but I'm still able to write lots of logic in Go and escape having to use the "bad language". I feel like despite the above there is still big wins by just having no application logic written in javascript or typescript.
Post reply on HN