3 ms·
> I would agree. If you have a hard time learning HAML, something is wrong. Why learn a new way of writing html at all though? what exactly is wrong with HTML
by trustfundbaby 13y ago
> I would agree. If you have a hard time learning HAML, something is wrong.
Why learn a new way of writing html at all though? what exactly is wrong with HTML as it is that necessitates learning a new way of doing it?
- tomc1985 13y ago* Writing end tags and angle brackets are annoying (and lots of wasted characters) * HTML's ceremoniousness is burdensome (I hate XML declarations) * I've never liked the appearance of regular code inside an XML document... visually, HAML looks a lot more like "code", so template code is more visually pleasing (this is a matter of taste)
- trustfundbaby 13y agoIn the end its all a matter of taste, and not any actual objective gain in developer productivity, which loops us back to the original point. If you have a team of people who love and want to do haml/coffeescript. have at it. If not, its just another thing to learn for people who'd rather not.
- lowboy 13y agoIf you're willing to learn CS, it is objectively better. I've been able to more efficiently write, read, and maintain CS than the equivalent JS. Having external factors such as a diverse team, or wanting to draw from a larger pool of developers should factor in to your decision to adopt CS. But as a language, I can say it's objectively better in my experience.
- dragonwriter 13y ago> If you're willing to learn CS, it is objectively better. I've been able to more efficiently write, read, and maintain CS than the equivalent JS. "I've been able to ..." indicates that it is subjectively better (better for the individual reporting.) It is not the kind of information that supports a claim of objective superiority.
- lowboy 13y agoFair point - I kept it to my experience because I don't have any objective empirical sources to draw from, so maybe I shouldn't use that word. I would argue that it is objectively better to have less boilerplate code (hasOwnproperty(), loop var initialization, lack of splats), visual clutter (brackets, braces, etc), strict comparison by default, string interpolation, array range notation, destructuring assignment, etc. My experience does back that up, but again, I can't source any objective empirical evidence. And it's important to have a thorough knowledge and experience with both languages. I find in arguments about CS, there's a lot of knee-jerk reaction from people who haven't given CS a fair shake. It had (has?) a "Ugh, hipster" backlash against it.
- slantyyz 13y agoWith things like Haml and Coffeescript, the only truth is that YMMV. On the individual level, I do think you can find actual objective gains in developer productivity, but on a aggregate level, it becomes muddier because of the variation of developer habits. Personally, I eliminated a lot of problems associated with close tags in my markup by using Haml. But my coding habits aren't someone else's coding habits, so Haml (or Coffeescript) can go from being a solution to being a problem for someone else.
- programminggeek 13y agoFor the same reason we don't write Assembly code or C or binary most of the time. Just because you can do it doesn't mean it's the most effective use of your time. The problem with HTML is the closing brackets that don't need to be there if you use indentation. If you are using indentation anyway, what is the point if closing tags? You can eliminate a lot of extra characters. It's not always perfect, but in many cases it is a lot cleaner.