5 ms·
Neither HTML, nor CSS are naturally untyped. Actually, React is not typed enough. Looking at the mozilla docs: https://developer.mozilla.org/en-US/docs/Web/HT
by tossandthrow 2y ago
Neither HTML, nor CSS are naturally untyped.
Actually, React is not typed enough.
Looking at the mozilla docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span#technical_summary https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sp...
You can see that eg. <span /> is not allowed to hold all types of elelemts.
How awsome weould it be, if th type system actually captures this.
- zelphirkalt 2y agoI guess many web developers would climb on a roof and throw stones, because then they really needed to learn HTML and using its elements semantically. And probably many of their web components would no longer type check either, forcing them to reimplement or use simpler elements.
- tossandthrow 2y agoThere was a time where front-end devs would have sat down and cried had they had to make closing tags.
- joquarky 2y agoEver heard of XHTML? There's a reason it's dead.
- tipiirai 2y agoThis is a great idea!