3 ms·
I cannot say I have had many problems with incorrect HTML. Since using HAML, I have had tabbing issues, inline javascript issues, a new syntax to learn (and tra
by nahname 14y ago
I cannot say I have had many problems with incorrect HTML. Since using HAML, I have had tabbing issues, inline javascript issues, a new syntax to learn (and translate). The last one is my main issue. 80% of your time spent with HTML is in the browser, the mental translation is more of a tax than anything.
I have used HAML on three projects and it always feels like it gets in the way more than it helps.
- Groxx 14y agoOn a couple big projects, I've generally liked it - since there's less boilerplate ("<>" and closing tags in particular) and the primary identifying bits (- or %ul or .class) are at the far left of each line, I can generally read things more quickly and more easily than e.g. straight HTML or ERB's <%= %>. But that comes from rather extended use, I'm definitely not claiming it's the best. There are plenty of things I dislike about HAML, but it does mean I read less, and I spend quite a bit of time reading and writing view code. Mind if I ask if you've done PHP programming? If you have, ERB's <% would seem to be a tax you've already paid.
- nahname 14y agoI am from a dotnet background originally, only created one php app back in my school days. For me, it is less about liking ERB and more about preferring the medium I am working in (HTML). If I could pick anything, it would be razor. It is similar to ERB in that you use HTML, but the painful percent brackets are replaced by a single @. Code blocks are as follows: @{ // code } another example: <div>@user.Name</div> It feels very natural to write and is simple to read/pickup. Now that microsoft has open sourced it, someone should make a version in ruby. Might be a good side project for me actually :)