<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">So: the main thing I noticed about HAML, to begin with, is that it was<br>
clearly a tool written for programmers (rather than dedicated<br>
client-side developers) to write HTML. Which, you know, sets alarm<br>
bells ringing.<br></blockquote><div><br>It would appear that HAML being a tool by programmers, for programmers isn't a bad thing after all. The most basic thing a programmer has to deal with is syntax, and that must be 100% correct for the program to run at all. This isn't true of markup code however - we have all seen sites that use invalid markup but the browser still displays them. So if the programmer mentality that syntax cannot be less than 100% valid can be enforced in the field of markup via tools such as HAML, that's a valuable thing IMO.<br>
<br>(But then again, I guess using HAML doesn't actually prevent one from writing invalid markup, does it?)<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
 If you don't write decent HTML, HAML won't help. If you do, it<br>
will. <br></blockquote></div><br>/ Vahagn<br><br><br><div class="gmail_quote">On Mon, Dec 14, 2009 at 6:11 PM, Tom Armitage <span dir="ltr"><<a href="mailto:tom@infovore.org">tom@infovore.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Thu, Dec 10, 2009 at 3:22 PM, Anthony Green <<a href="mailto:Anthony.Green@bbc.co.uk">Anthony.Green@bbc.co.uk</a>> wrote:<br>

>> Isn't it time you all gave in and used haml?  Come on - you know it<br>
>> makes sense....<br>
><br>
</div><div class="im">> As a Semantic HTML Web Standardista I also presumed it could only lead to<br>
> more terrible HTML code.<br>
<br>
</div>So was I, and am now convinced this just isn't true.<br>
<br>
So: the main thing I noticed about HAML, to begin with, is that it was<br>
clearly a tool written for programmers (rather than dedicated<br>
client-side developers) to write HTML. Which, you know, sets alarm<br>
bells ringing.<br>
<br>
However: if you know HTML, and write good HTML, there's nothing to<br>
stop you using HAML to write good HTML. Very good HTML, in fact. The<br>
few decent HAML sites I've worked on are behind firewalls, I'm afraid,<br>
otherwise I'd send you a link.<br>
<br>
You do have to do a small amount of translation, but there are some<br>
good trade-offs:<br>
- HAML spits out valid (X)HTML automatically. Either it throws an<br>
error because you've made a mistake, or it generates and closes an<br>
element. Yes, I usually write valid code; HAML ensures I do.<br>
- HAML spits out beautifully formatted code. This is really, really<br>
useful; I hate debugging sites based on a "view source" view that's a<br>
mess, caused by partials and ERB templates with their own indentations<br>
all playing havoc with one another. This is avoidable, but HAML<br>
doesn't require you to take great lengths; it spits out nicely<br>
formatted code, which makes debugging fine.<br>
<br>
Honestly, as a decent client-side dev, I've been able to implement<br>
complex, fiddly designs in HAML with no trouble; I've been able to<br>
write decent, semantic haml and avoid divitis with no problem; I've<br>
managed to majorly cut down repetition and lines-of-code written, and<br>
yet the templates are clear, understandable, and well-maintained.<br>
<br>
I am always wary of abstractions, and as with all abstractions, the<br>
main point is: make sure you understand the thing being abstracted<br>
first. If you don't write decent HTML, HAML won't help. If you do, it<br>
will. This is the main problem it has (and, that because it's all a<br>
bit strange, it's favoured by back-end devs, rather than client-side<br>
bods). But I'm a total convert, if only for my wrists' sake.<br>
<br>
(Still not convinced on SASS yet, in part because it's *too* similar<br>
to CSS. That's my inner csd coming out).<br>
<div><div></div><div class="h5">_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br>