by andrei_says_ · 8y ago · 0 comments
Then I found slim. It eliminates most of the markup, reducing it to its humanly readable essence, producing clean well-formed html.
Writing, and more importantly, reading only the meaningful part of the markup has helped my productivity skyrocket.
My eyes don’t have to struggle to figure out the document structure.
Slim has been around for years, steadily improving and addressing corner cases.
I absolutely love it. Reduces typing by 50%, reading by 1000+%(as I re-read the code multiple times and it eliminates the multiple takes and looking for closing tags) and matches how my human brain thinks about markup.
Pug (actually Jade at the time) v0.1: Jul 5, 2010
I'm thinking these are "convergent evolution", especially since they arose in different language communities.
I totally agree that this is the best way to generate HTML. I use pug even for really tiny pages and templates. It amazes me that people like JSX, which seems like a total regression from building elements with function calls like React originally had. When I code Cycle.js in coffeescript it looks and feels a lot like pug; which is great.
For me, typing full html is no longer an option. Even with emmet I’d have to read it, multiple times, with all the markup syntax poking my eyes.