Slim VS Haml

Compare Slim vs Haml and see what are their differences.

Slim

Slim is a template language whose goal is to reduce the syntax to the essential parts without becoming cryptic. (by slim-template)

Haml

HTML Abstraction Markup Language - A Markup Haiku (by haml)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
Slim Haml
31 28
5,315 3,768
0.0% 0.0%
6.4 6.0
3 months ago 3 months ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Slim

Posts with mentions or reviews of Slim. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-30.

Haml

Posts with mentions or reviews of Haml. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-10-16.
  • Douglas Hofstadter on Lisp (1983)
    8 projects | news.ycombinator.com | 16 Oct 2024
    I never suggested that I was the first person to think of this; not having dealt with any Lisp since (hmmm) 1990 via Scheme in my introductory CS 212 class at Cornell probably has something to do with my ignorance of the prior art in this area. I do like your approach of breadcrumbing me instead of giving me the answer, though... best I can guess is "tooling" and simply that S-expressions are simply too embedded in the minds of the Lisp community at this (or previous) point(s).

    I also don't deal with significant-indentation in languages usually (and have a strong Python distaste); though I've been playing with Roc (https://www.roc-lang.org/), which has this, and have used HAML (https://haml.info/) in the past. I suppose auto-indenting is impossible in a significant-indentation language depending on what the editor can intuit based on how the previous line ended, but I don't think I'd need that feature.

    I did research "sweet expressions" (which are apparently also called T-expressions) and found the prior art there in Scheme and Lisp, and a library called "sweet" for Racket (which is another intriguing lisp dialect!). These might have gotchas, but apparently they've sufficiently solved the problem enough to be usable.

    I do simply like how "T-expressions" look. Which is something I guess I care about, although I know that's not a universal among coders.

  • A RuboCop Configuration Tailored for Phlex
    4 projects | dev.to | 20 Sep 2024
    Phlex takes a more Ruby-centric approach to generating HTML by using Ruby classes and methods instead of traditional template files like ERB or HAML. While this is great for reusability and code organization (And writing more Ruby 🤩), it can lead to long methods and classes, especially when building complex components or pages. Adding TailwindCSS into the mix further increases line lengths because of its utility-first CSS approach, where multiple classes are often stacked together.
  • Show HN: Slab – A programmable markup language for generating HTML
    5 projects | news.ycombinator.com | 23 Jul 2024
  • XRB alternatives - Haml, Slim, and Hamlit
    4 projects | 30 Apr 2024
  • Building a syntax highlighting extension for VS Code
    12 projects | dev.to | 1 Mar 2024
    First of all, I like Slim. I like the beauty and cleanness of Slim templates, to me they are way more readable than regular ERB templates and I think they fit in the ruby/Rails ecosystem very well. Slim is a close cousin to Haml, without the ugly percent characters, haha. I've used Slim exclusively in my projects since about 2016.
  • Hamlet: A type-safe Haml template engine for Go
    5 projects | news.ycombinator.com | 1 Jan 2024
    > I can't say what problem it is supposed to solve

    "Haml accelerates and simplifies template creation" https://haml.info/

    If you'd rather write raw HTML, keeping track of closing tags etc, then don't use HAML. No need to bash it because you personally feel it is ugly or unnecessary. FWIW I personally feel the exact opposite.

  • Any web frameworks that could compare to Symfony?
    10 projects | /r/rust | 9 Mar 2023
    Personally, I'd recommend Maud if you don't need something with runtime reloading. Not only is it much faster, it implements a template language that is effectively the Rust-syntax equivalent to Slim or Haml using a procedural macro, so you get compile-time verification that your HTML output is well-formed.
  • Rux: A JSX-inspired way to render view components in Ruby
    15 projects | news.ycombinator.com | 6 Mar 2023
    Does this support HAML-style syntax? We're 100% HAML-only for templating, whether normal Rails views or ViewComponent... https://github.com/haml/haml https://haml.info/ so going back to writing HTML or ERB feels like a huge downgrade.
  • Anyone from a Typescript/React background who tried out Rust for the 1st time?
    9 projects | /r/rust | 4 Mar 2023
    For templating, Maud is fast, gives compile-time well-formedness guarantees, and outputs minified HTML by default as a side-effect of it being based on Rust macros. (It's of a similar design philosophy to Slim and Haml)
  • Why must closing tags in HTML and XML contain the name of the tag being closed, if the tag being closed can be determined by the order they were opened?
    1 project | /r/askscience | 22 Dec 2022
    You don’t even need closing tags. Both Haml and Jade do away with closing tags altogether.

What are some alternatives?

When comparing Slim and Haml you can also consider the following projects:

Liquid - Liquid markup language. Safe, customer facing template language for flexible web apps.

Hamlit - High Performance Haml Implementation

Sanitize - Ruby HTML and CSS sanitizer.

Tilt - Generic interface to multiple Ruby template engines

Mustache - Logic-less Ruby templates.

tachyons - Functional css for humans

Arbre - An Object Oriented DOM Tree in Ruby

Curly - The Curly template language allows separating your logic from the structure of your HTML templates.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured

Did you konow that Ruby is
the 12th most popular programming language
based on number of metions?