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

This was me until about the 3rd time I played around with Haml. Then it occurred to me how much noise I got rid of by using it, after which I was hooked.

Jquery + Haml is a very close impedance match and a real pleasure to use for development.



"Jquery + Haml is a very close impedance match" - is that another way of saying they're a good combo or is there more to it than that?


It's actually more specific than that.

Take the following Haml that defines a div with an id of "foo" along with a span with class "bar" and content "Hello World":

  #foo
  %span.bar Hello World
If I wanted to hide those elements, I'd write the following jQuery in a separate file:

  $('#foo').hide();
  $('span.bar').hide();
That's really powerful stuff. The Haml syntax for defining elements looks exactly like the CSS3-style selectors used by jQuery, so much so that I often cut and paste my Haml markup into my javascript files.


Glad I asked. I had no idea there was such a close relationship.




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

Search: