4 ms·
I'm sad that SPAs have made us regress from haml back to plain html. Without closing tags, a whole class of bugs just goes away, and you can read your document
by pjungwir 8y ago
I'm sad that SPAs have made us regress from haml back to plain html. Without closing tags, a whole class of bugs just goes away, and you can read your document structure at a glace. (Ease of reading is much more valuable than the saved typing in my opinion.) In my own React work I've found it nicer to use pug for templating, instead of jsx, and setting it up in webpack was just a couple lines. On team projects it's hard to get consensus for something like that though. I'd love to see a WASMable whitespace-sensitive html templating library for Rust. I bet it would even give the tokenizer a break so you don't have to quote the strings.
- err4nt 8y agoHTML syntax is a lot more flexible than a lot of people choose to write it. The following is a valid table in HTML: <table> <caption>Example Table <thead> <tr> <th>Col 1 <th>Col 2 <th>Col 3 <tbody> <tr> <td>One <td>Two <td>Three <tfoot> <tr> <td>Four <td>Five <td>Six </table> I'm currently drafting an article of HTML you never need to write, currently I'm covering: - some start tags are implied and never need to be written unless you're adding attributes - some end tags are implied and never need to be written - default attributes never need to be specified - element values often don't require quoting - no trailing slashes are required on void tags