by trustfundbaby · 12y ago · 0 comments
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?
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.
* 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)
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.
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.
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.
"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.