Ask HN: Why do we still build the web in XML?
Sorry, I'm tired of closing <div> tags.
Sorry, I'm tired of closing <div> tags.
1. https://en.wikipedia.org/wiki/Gopher_(protocol)
2. https://en.wikipedia.org/wiki/Wide_area_information_server
3. https://en.wikipedia.org/wiki/Project_Xanadu
4. https://en.wikipedia.org/wiki/HyperCard
5. https://en.wikipedia.org/wiki/Java_applet
6. https://en.wikipedia.org/wiki/NeWS
And so on...
Upon further consideration, maybe just closing the <div> tags isn't so bad after all...
All of that said, you can still get Java in the browser working today, albeit not applets per-se, using JNLP / JWS. It takes some effort considering JWS was removed from the base JDK a while back, but there is an open source effort to keep it alive.
Viva la semantic and expressive HTML code!
Avoid this feeling of mental toil by using a text editor which does this for you.
There are definitely plugins for auto-closing your HTML tags that will make your life easier, though.
XML fell out of SGML - trust me, you don't want to go there. So did HTML.
Also too: the IDEs I use always form closed tags. No effort needed.
JSX may have solidified the XML markup style in the developer's toolbox though. Especially with server side rendering too.
https://www.destroyallsoftware.com/talks/wat
Can't we just get WASM browser APIs and then do the web in whatever programming language we want?
Modern web is not always user friendly, and many users benefit from ad blocking, data extraction, per-site fixeups and so on. The limited and flaky Javascript helps a lot - we can block the 3rd party script, and the pages will continue displaying without the ads; any data fetching is via browser's http engine and in most cases using JSON or XML format; and the sites are expected to support a wide range of browser features so they are often compatible with much older/newer browsers.
Now imagine web using "compiled language" model (or if you are old enough, remember ActiveX or Flash-as-entire-website): you get that immutable blob of binary code and there is very little you can do. Reverse-engineering it is non-trivial, takes a lot of time and any patches you produce may break with the next release. A trivial change like making input box a big bigger is a major effort.
(one may say: "but wait! WASM will only replace Javascript, the HTML/DOM will still stay around, so it would not be that bad!". You are too optimistic, I bet there right now, there are people who want to do it all in WASM and only need canvas from web browser.)