Hacker News new | past | comments | ask | show | jobs | submit login

I've used HAML and Jade a fair bit, and I've also had the joy of converting them back to HTML. I've experience the opposite to you, where we've had a much easier time with plain HTML than a specific abstraction of it. I've also had the joy of taking HAML and turning it back into HTML. It's no fun.

To clarify the nested tag example, using an unordered list fails to take into account the other methods of nesting elements in HTML:

    %p This is a paragraph with
       %strong emphasis
       inline and maybe a
       %span dynamic portion of the text

    %p This is a paragraph with <strong>emphasis</strong> inline
       and maybe a <span>dynamic portion of the text</span>
I'd also add that the fact HAML auto-closes your tags is totally negated by the fact you have to keep track of indentation instead. If you nest something when you shouldn't or vice-versa, good luck tracking it down, because the markup won't be broken.

As for interpolation, I like to know when part of the template is evaluated as code, and when it isn't. PHP, ERB, etc. all keep the distinction between the markup and the language very clear. These don't.

This stuff clearly adds value for you. That's fine. For me, it doesn't, and I think using an abstraction like this on the basis that it stops you getting the markup wrong feels worse than using it because you just dont know HTML. If you need something like HAML or Jade or this thing to close your tags for you, then that says something about the structure of your document.




I would argue, from personal experience, that anytime you can either 1-remove a class of errors, or 2-move that error discovery sooner to the time of authorship or compilation you have likely reduced the number of bugs that you will ship with. HAML accomplishes this for tag closing errors.


but with the downside that incorrect nesting errors are less visible. When elements are spaced far apart vertically it can be hard to tell if the indents are the same; whereas with a closing tag it can be more obvious, particularly if your editor highlights the matching opening/closing tag to the one your cursor is over. If your editor can show HTML validation errors then tag closing errors are also visible.


A valid point, although I have had the opposite experience. I can site down a line of code and see what is indented, as it is physically more to the right. The highlighting of matching tags doesn't work well for me because in highly dense or imperfectly formatted code, I'm not sure which tag I want it to be highlighting for the close tag in the first place.




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

Search: