I’ve recently switched from ERB to HAML and I have to admit it’s an absolute joy to use, not sure why I didn’t make the switch sooner.
I find the best way to learn a new framework or language is to put it through a short litmus test. For Haml I built a small CRUD app, after about 15 minutes I couldn’t see myself going back to erb.
I looked at an old rails project I did using erb, I suddenly had this urge to rewrite it using haml.
Haml is based on the principle that markup should be beautiful. It accomplishes this by enforcing indentation ( I had to learn this the hard way), respects the DRY principle by removing the need of closing tags on elements.
The only pet peeve I have is how you declare a html5 doc by writing “!!! 5”, seems odd to me, perhaps there’s a logic reason to this that I’m not aware of.
A useful link about getting started with HAML http://railsapps.github.io/rails-haml.html