Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog post to this effect last year:

http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-f...

As a result, though I love Haml, I think ERb is a more sensible default.



I feel like if you've got lots of text and embedded code mixed together in a template there's probably something wrong with your architecture.

For the few cases where that makes sense, ERb is great. But I have a hard time imagining it's common enough to make it the default.

Edit: Also, the post you linked to outlines several simple ways to mix text into your HAML (inlining HTML, using markdown filters, etc)


I think ERB ends up kind of ugly for prose too; adding rdiscount as a dependency and using the markdown filter in Haml is usually how I do it.


Sounds like a good solution. I'll have to try that out.


Full Disclosure: I am not a haml developer. I'm a haml user -- I only develop on sass.


Oops, by bad.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: