This was a decision that was stumping me for a bit.
Haml: http://haml.info/
Slim: http://slim-lang.com/
I’m not going to go into the details of what each does. If you got to this point, you probably already have an idea and they are very similar.
So here’s the main points:
Haml
- More widely used
- Better supported by tools such as RubyMine and haml-lint
- A bit slower
Slim
- More momentum than Haml
- RubyMine now has support for Slim, but it’s still a bit buggy when it comes to refactoring
- A bit faster
- More modern, slightly better syntax
This discussion set me over the edge:
Shane da Silva (sds on github)
Yes, if given the option I would choose Slim for new projects. Its use of the Temple library was a solid design decision (given my experience diving into the HAML project’s code). Granted, HAML works great as well, I just see Slim as more extensible given the framework it was built on top of.
Maybe I’ll find some time to spike on a quick proof of concept to get the ball rolling. Given Temple simply returns Sexps, it should be easy to get started with.
slim is my personal preference too, but in the last project I started I chose haml just because there’s haml-lint.
slim-lint has been on my “personal project candidate list” for a while, so I’ll be willing to help if this is actually started and I get some spare time.
Thus, I’m going with Slim for new projects for server side rendering, unless I’m going to be using ReactJs.