3 ms·
>It is this flirty declarative nature makes HTML so incredibly robust. Just look at this video. It shows me pulling chunks out of the Amazon homepage as I brows
by crimsonalucard 8y ago
>It is this flirty declarative nature makes HTML so incredibly robust. Just look at this video. It shows me pulling chunks out of the Amazon homepage as I browse it, while the page continues to run.
This is actually really really bad. HTML renderers should have been designed to immediately fail when incorrect. This allows developers to more easily write correct and robust code rather than making the browser be robust. If the web were designed this way, you'd have a world where only correct html is written.
Also its not like we are not engineering a war machine here. Machines like the warthog are designed to keep functioning when components are destroyed. This is not necessary for html as we are not sending our html into a war zone. Sections of your html are not actively being removed/destroyed by users.
The author later compares html to javascript. Seriously. Javascript is a whole different ballgame. Javascript is bad because there are many hidden states of failure that aren't apparent. In HTML there are only two states, failure or success. If HTML failed as soon as it's incorrect, you will know immediately. Nothing is hidden. In javascript, incorrect logic can lay buried until a specific use case is hit.
That being said, he mentions stuff about the pyramid model for the web which is fine. I can agree with having javascript as the tip of that pyramid.
- lostgame 8y ago>> If the web were designed this way, you'd have a world where only correct html is written. You'd also potentially be looking at a web that is far more unstable and crash-prone if you essentially treated a browser like a compiler or the like.
- saagarjha 8y agoI believe the point was that if we had made stricter browsers, the web would be much more correct and standards-compliant.
- crimsonalucard 8y agoThe creator of the html page will typically look at the website before he publishes it, so unlikely that someone will publish incorrect html code. It's not like html has branching logic so there's no hidden crashes, everything is explicit similar to the safety you get with type checking. javascript is actually bad for the same reasons. It tries to correct your mistakes by doing type coercion making a null + 1 + 'blah'= "null1blah"
- saagarjha 8y ago> Sections of your html are not actively being removed/destroyed by users. My adblocker does this.
- crimsonalucard 8y agoFair point. From the developers point of view though, the site is incorrect without the ads. He wants you to look at the ads, he's not in the business of providing you website content for free. Still the adblocker actually does a surgical removal that maintains correctness of the html.