Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>was then made ugly to be familiar and since then introduced major churn and bloat that was never needed.

Javascript development used to be simple, elegant and fun, back in the days of JQuery plugins when all you needed was a text editor and an FTP account. All of this churn and bloat isn't the fault of the language, it's the fault of Node.js and the commodification of Javascript by enterprise and startups wanting to force the language to be something it was never meant to be, because Javascript developers are a dime a dozen.

>Imagine a world where HTML, CSS and JS were all just a unified language, with sound, simple primitives at the bottom, extensibility (macros, schema...) built-in, and a well designed standard library.

That's the world we live in now. A lot of the bloat of modern javascript comes from generating HTML and CSS dynamically, rather than having them be static as intended. That separation of concerns is there for a reason, and the simplicity of that model is what makes the web so hackable. It's easy to drop a script into a page or a new CSS file. Hotpatching a running application not so much. Degradation is easier when things are separate as well. An HTML page should work without CSS or JS. Having everything be a single, executable language means even simple hypertext documents can fail to render because of errors.

Which i know seems like a great idea to developers, but there's a good reason XHTML, which had the same "feature", never took off. People would much rather have error correction even at the cost of greater complexity because it's more important that the web work than that it look pretty doing so.

>Think of how much more productive developers would be, the possible performance optimizations in browser engines, much simpler tooling, less arbitrary choices, less hacks and workarounds.

That's not what would happen. Think of the worst, ugliest, most sprawling spaghetti codebase you've ever seen.

Everything would look like that. Everything.



The bloat mainly comes from the fact that HTML/JS/CSS are not extensible or only to a primitive degree. I don't care about what was intended or not, the point is that the model fails since almost two decades.

The separation of concerns doesn't hold and is failing us all the time, HTML is not just information structure, it is also interactivity and layout. CSS is rigid, complex and inexpressive. One often has to at least generate it and sometimes manipulate the DOM via JS to build even simple visual constraints and relations.

Why do the specs of the languages keep growing? Some of it is what you said about programming culture, but the more fundamental problem is that we're dealing with an entirely inappropriate, inextensible model that we keep on patching.

> That's not what would happen. Think of the worst, ugliest, most sprawling spaghetti codebase you've ever seen.

> Everything would look like that. Everything.

That's exactly what we have now pretty much everywhere, but with extra layers, workarounds and patches on top. It's not good!

Don't get me wrong though. I love the web - and all of this is hindsight. The above is maybe just wishful thinking and fantasy.


Parts of our code base are still using jQuery and it's the most spaghetti-ish code we have. So difficult to reason about state and remembering what UI elements are present that need to be updated. It's made me really appreciate the developer-experience simplicity of React.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: