Live data from Hacker News

Douglas Crockford on JavaScript

digest.browsertech.com

61–70 of 202 posts

Re: Douglas Crockford on JavaScript

#61

Is he talking about the old Because to me, it's quite remarkable how JavaScript has evolved since Not to mention, the integration with Web APIs has been a game changer. Fetch API, WebSockets, Web Storage, WebRTC and Service Workers, WebAssembly really enables a lot of functionality that's all easy to use and very fast. TypeScript also helps with gradual typing together with syntax highlighting and lookups are superb…

> ES6+ introduced a slew of features like arrow functions, template literals, async/await, destructuring, classes, enhanced object literals and native modules.

This is the problem.

All of this has made the language worse. Just accreting features doesn't make the foundation less broken.

Re: Douglas Crockford on JavaScript

#62
post #59

JavaScript is fine, the real problem is HTML/CSS and the DOM. We were so, so close to a semantic, reader-based web ~20 years ago. The ad supported Internet killed it. Now that the ad supported Internet is dying, maybe we can get back to it.

> JavaScript is fine

What languages to you have experience with?

The article mentions some alternatives, like Elm, and I'd be hard pressed that people who used those (say Elm) effectively still believe JS is fine.

Re: Douglas Crockford on JavaScript

#63

Trying not to make this an ad-hominim attack, but Crockford has been a net negative to JS for 20 years now. While people like John Resig were innovating (jquery) working with the language and around all kinds of language quirks 15 years ago, Crockford wrote his book "The good parts" that tried to write java in javascript. And probably did more to make people write bad JS code than anything else. Then he made the mess…

> Crockford has been a net negative to JS for 20 years now.

I'd say JSON is pretty successful as a protocol, even beyond JavaScript.

Also The Good Parts is probably as important now as it was when it was published. The language hasn't improved — it's just grown.

Re: Douglas Crockford on JavaScript

#64
The problem is not just a language problem. The problem is the repurpose of the web as an "operating system". HTML and CSS are OK for document layout and styling, and JS is OK for simple interactions. BUT none of these were designed to handle highly complex and dynamic applications. We are just building on the wrong foundation, hacking to extremes to twist the the framework to the current trend. We are using the wrong tools for the job.

Re: Douglas Crockford on JavaScript

#65
post #46

> It used to be that we’d get new computer languages about every generation. […] And then it kind of stopped. There are still people developing languages, but nobody cares. I think this is false. We can see great interest in new languages, and I feel like languages like Rust and Go have achieved to move the ball forward significantly for backend / system software development. It's just that noone has been able to rep…

> It's just that noone has been able to replicate that kind of success [of Rust's and Go's achievements] in the web-based frontend space.

While it's easy to dog on Javascript, it's also necessary to consider what Javascript does right.

The main thing that comes to mind is JS' async-everything, async-by-default, and first class async abstractions (like the Promise). Not necessarily something you want all the time, but certainly a powerful feature when it comes to IO-bound tasks and UI development. We don't give enough credit to JS for this imo since we take it for granted.

But consider something like this (JS) using WaitGroups in Go:

    const aPromise = promise()
    const [b, c] = await Promise.all([promise(), promise()])
    const a = await aPromise

Re: Douglas Crockford on JavaScript

#67

> "[...] we are crushing ourselves with the accumulated complexity we’ve piled on top of bad foundations [...]" The same could be said about plain HTML/CSS though. I think the author is correct overall and I don't really see improvement on the horizon. WebAssembly, while great that it exists, can morph browsers into some poor mans virtual operating system and this can lead to a less open web. We already see more clos…

> The same could be said about plain HTML/CSS though. Genuine question: How much of the complexity of working with HTML/CSS is unnecessary and how much is inherent to the problem they solve? Is it as bad as with Javascript? I would say that we, for the most part, have a very clear idea of how we could (theoretically) replace Javascript with something much better. I don't know of alternative layout languages, so I don…

TeX solves the core problem of responsive layout using just a small handful of primitives. No one seems to have noticed that FlexBox is mostly a copy of the TeX boxes and glue model.

Re: Douglas Crockford on JavaScript

#68
post #59

JavaScript is fine, the real problem is HTML/CSS and the DOM. We were so, so close to a semantic, reader-based web ~20 years ago. The ad supported Internet killed it. Now that the ad supported Internet is dying, maybe we can get back to it.

No it's not, and we do have semantic web accessible to screen readers. It is just also this incredible universal platform for building and distributing applications. It's a universal layer accessible to all, no mater your socioeconomic background, politics or location.

Criticising the web platform as not confirming to a set of self defined rules is lazy and pointless.

Re: Douglas Crockford on JavaScript

#69
post #62
post #59

JavaScript is fine, the real problem is HTML/CSS and the DOM. We were so, so close to a semantic, reader-based web ~20 years ago. The ad supported Internet killed it. Now that the ad supported Internet is dying, maybe we can get back to it.

> JavaScript is fine What languages to you have experience with? The article mentions some alternatives, like Elm, and I'd be hard pressed that people who used those (say Elm) effectively still believe JS is fine.

You're too old to be a language elitist.

Re: Douglas Crockford on JavaScript

#70

Trying not to make this an ad-hominim attack, but Crockford has been a net negative to JS for 20 years now. While people like John Resig were innovating (jquery) working with the language and around all kinds of language quirks 15 years ago, Crockford wrote his book "The good parts" that tried to write java in javascript. And probably did more to make people write bad JS code than anything else. Then he made the mess…

Oh wow. This is the guy who did YUI? That was the most abjectly horrifying thing I've ever been forced to deal with (on one random client project) in the history of web development. Just the utter peak of esoteric artificially complex inelegant developer slop.
Post reply on HN