I spend my days working concurrently on married Rails (with HAML) and PHP (with...PHP templates) applications, and I will unequivocally say that the HAML templates are cleaner, easier to read, easier to maintain, and easier to develop on.
HAML put me off at first because I thought exactly as this guy did - "Why do I need to learn an abstraction? It'll just slow me down. I know HTML well enough already." Once I actually started using it, my opinion there flip-flopped insanely quickly. I guess I would say that if you find HAML too hard to read, you haven't spent enough time reading it. Most any form of data expression takes some time to learn.
HAML makes me faster. A lot faster. Not having to track down where a closing tag was omitted, never accidentally crossing tag scope, and being able to trivially ascertain the selector path of a given bit of markup makes templating fast. I do a lot of it "the old way" too, and...it's just not as fun. It's frustrating, and slow, and it's not because I'm bad at it - I did it for years before HAML - it's because if you take the time to learn it, HAML is genuinely better.
Terseness is a feature. It's not just an abstraction for abstraction's sake - removing boilerplate and clutter that isn't really needed to concisely express an idea is a real, tangible, honest-to-god feature. It's why I sigh every time I have to maintain a config file in XML rather than JSON or YAML or even just good old INI format. It is the primary selling point of Coffeescript. It's why Java is the butt of so many jokes. It's why people write DSLs.
Maybe HAML isn't useful to you. That's fine. Whatever you're most productive in, work in that. But it's just arrogant to proclaim from on high that HAML is an "unforgivable sin" and that anyone using it is worthy of nothing but scorn and contempt.
My love for haml was formed in about... 5 minutes. I took an existing template (had some free time) and ported it to haml. After eliminating about 30% of the typed characters/lines on that template, I realized how much less work it was to create a haml template vs html. Less maintenance, less syntactic bloat, the content just flowed. Mind you I have been writing HTML for 4 years now without any problems.
I no longer had debates (do I add a <span> tag here because I really don't f-ing feel like typing it) because it was trivial. It let me focus on content rather than the html.
Also zero possibility of someone screwing up indentation thus causing a 100 line file to become completely unmaintainable. Which happens VERY often in html unless the writer is disciplined to all hell.
Also: less characters + cleaner syntax = significantly easier to comprehend.
Comments
I spend my days working concurrently on married Rails (with HAML) and PHP (with...PHP templates) applications, and I will unequivocally say that the HAML templates are cleaner, easier to read, easier to maintain, and easier to develop on.
HAML put me off at first because I thought exactly as this guy did - "Why do I need to learn an abstraction? It'll just slow me down. I know HTML well enough already." Once I actually started using it, my opinion there flip-flopped insanely quickly. I guess I would say that if you find HAML too hard to read, you haven't spent enough time reading it. Most any form of data expression takes some time to learn.
HAML makes me faster. A lot faster. Not having to track down where a closing tag was omitted, never accidentally crossing tag scope, and being able to trivially ascertain the selector path of a given bit of markup makes templating fast. I do a lot of it "the old way" too, and...it's just not as fun. It's frustrating, and slow, and it's not because I'm bad at it - I did it for years before HAML - it's because if you take the time to learn it, HAML is genuinely better.
Terseness is a feature. It's not just an abstraction for abstraction's sake - removing boilerplate and clutter that isn't really needed to concisely express an idea is a real, tangible, honest-to-god feature. It's why I sigh every time I have to maintain a config file in XML rather than JSON or YAML or even just good old INI format. It is the primary selling point of Coffeescript. It's why Java is the butt of so many jokes. It's why people write DSLs.
Maybe HAML isn't useful to you. That's fine. Whatever you're most productive in, work in that. But it's just arrogant to proclaim from on high that HAML is an "unforgivable sin" and that anyone using it is worthy of nothing but scorn and contempt.
My love for haml was formed in about... 5 minutes. I took an existing template (had some free time) and ported it to haml. After eliminating about 30% of the typed characters/lines on that template, I realized how much less work it was to create a haml template vs html. Less maintenance, less syntactic bloat, the content just flowed. Mind you I have been writing HTML for 4 years now without any problems.
I no longer had debates (do I add a <span> tag here because I really don't f-ing feel like typing it) because it was trivial. It let me focus on content rather than the html.
Also zero possibility of someone screwing up indentation thus causing a 100 line file to become completely unmaintainable. Which happens VERY often in html unless the writer is disciplined to all hell.
Also: less characters + cleaner syntax = significantly easier to comprehend.