Need advice about which tool to choose?Ask the StackShare community!

HAML

443
309
+ 1
267
Pug

1K
920
+ 1
408
Add tool

HAML vs Pug: What are the differences?

What is HAML? HTML Abstraction Markup Language - A Markup Haiku. Haml is a markup language thatโ€™s used to cleanly and simply describe the HTML of any web document, without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ERB, and ASP. However, Haml avoids the need for explicitly coding HTML into the template, because it is actually an abstract description of the HTML, with some code to generate dynamic content.

What is Pug? Robust, elegant, feature rich template engine for nodejs. This project was formerly known as "Jade." Pug is a high performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers.

HAML can be classified as a tool in the "Languages" category, while Pug is grouped under "Templating Languages & Extensions".

"Clean and simple" is the top reason why over 66 developers like HAML, while over 118 developers mention "Elegant html" as the leading cause for choosing Pug.

HAML and Pug are both open source tools. It seems that Pug with 18.3K GitHub stars and 1.9K forks on GitHub has more adoption than HAML with 3.43K GitHub stars and 544 GitHub forks.

According to the StackShare community, Pug has a broader approval, being mentioned in 173 company stacks & 118 developers stacks; compared to HAML, which is listed in 113 company stacks and 40 developer stacks.

Pros of HAML
Pros of Pug
  • 68
    Clean and simple
  • 49
    No html open/close tags
  • 39
    Easier to write than ERB
  • 36
    Forces clean and readable code
  • 34
    Simpler markup language
  • 24
    Open Source
  • 16
    HTML Templating
  • 1
    You'll love it if you like Haikus
  • 126
    Elegant html
  • 85
    Great with nodejs
  • 52
    Open source
  • 52
    Very short syntax
  • 52
    Structured with indentation
  • 21
    Free
  • 4
    It's not HAML
  • 3
    Really similar to Slim (from Ruby fame)
  • 3
    Easy setup
  • 3
    Gulp
  • 2
    Clean syntax
  • 2
    Difficult For Front End Developers,learn backend
  • 2
    Readable code
  • 1
    Disdain for angled brackets

Sign up to add or upvote prosMake informed product decisions

Cons of HAML
Cons of Pug
  • 3
    It's not Pug
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What companies use HAML?
    What companies use Pug?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with HAML?
    What tools integrate with Pug?
    What are some alternatives to HAML and Pug?
    Slim
    Slim is easy to use for both beginners and professionals. Slim favors cleanliness over terseness and common cases over edge cases. Its interface is simple, intuitive, and extensively documented โ€” both online and in the code itself.
    YAML
    A human-readable data-serialization language. It is commonly used for configuration files, but could be used in many applications where data is being stored or transmitted.
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    Python
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    PHP
    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
    See all alternatives