Hacker News new | ask | show | jobs
by joeyespo 5470 days ago
While I also think this is too indirect for my taste, I'd really like to know why the maintainers hate it. Is it simply because they've never learned HAML and how to debug/maintain it? Or because it truly is a nightmare?

I'm interested because I was thinking about trying it. I've been wondering about the maintenance implications though.

2 comments

Most of the "I hate Haml" arguments can easily be solved by use of filters (e.g. :markdown, :textile, :javascript, :plain, :erb, etc) and/or proper use of helpers or cells (I prefer cells).

The things I most often see people doing wrong are trying to format body text with Haml and putting excessive logic in your Haml templates (which is something to look out for anyway, even if you use erb, slim, or whatever).

The former. The first guy that loves Haml a lot has used it on tons of projects, and knows its quirks, has his own clever tricks, etc.

Someone else comes along and has to set up a Ruby environment and learn a new syntax (for layout and templating) just to add a new element to the page. That gets frustrating really quickly.

Haml and its like are not a nightmare at all. I do appreciate the elegance of the resulting code and this offers a lot of benefits. It's just hard to get everyone to buy into it on a team.

I don't really get this. Conceptually, haml IS html. Sure the syntax is a bit different, but it's hard for me to imagine that a decent programmer would get hung up on this. Same with coffeescript really. If a cleaner syntax on top of a language scares you, you don't really grok the original language all that well in my opinion. There are certainly arguments for sticking with vanilla html/js, like the potential minor hassles of dealing with file conversions and debugging generated code, etc., but fear of a new syntax that can be learned in 15 minutes is a weak one.

Edit: I do grant that js to coffeescript is a bit more of a leap than html to haml since coffeescript actually introduces some new language concepts.