4 ms·
This is great, but why oh why do people still use HAML over SLIM[1] as their templating language? % is unnecessary, and I find slim's attribute handling far su
by blissofbeing 13y ago
This is great, but why oh why do people still use HAML over SLIM[1] as their templating language?
% is unnecessary, and I find slim's attribute handling far superior to clunky haml, and to top it all off slim compiles faster than haml.
1: http://slim-lang.com/ http://slim-lang.com/
- glitchdout 13y agoArguing about HAML and SLIM is pretty useless. Easy to write, hard to read. Plain old ERB for me any time.
- rhizome 13y agoPlus it's an extra dependency and a narrowing filter for hiring.
- wereHamster 13y agoExtra dependency that I buy. But narrowing filter for hiring? Seriously? Any web developer should be able to pick up any of these templating languages (as well as CSS preprocessors such as less, sass etc) in less than a day.
- majormajor 13y agoI've had almost the opposite experience: reading ERB (or JSP or whatever) is a giant pain in my ass since it frequently isn't maintained with consistent indenting and formatting. I like that HAML forces that on you.
- gyardley 13y agoWhy oh why do people throw non-default templating languages into their tutorials when it's not relevant to the tutorial at all? When you write your views in ERB, your tutorial's accessible to everyone who's used Rails, and the HAML / Slim / Mustache / Liquid / whatever people can convert them over easily. When you write your views with something other than ERB, someone who's only familiar with ERB has a much harder task, especially if they're new to Rails and don't know much about alternate templating languages.