Why not use Mustache or another templating library?

Mustache is a fine templating library and liked by a lot of people. However I see these drawbacks:

  • 600 lines of code, 9 contributors for 20 line code problem - it’s therefore difficult to understand completely.

  • All data is automatically escaped for special characters in HTML.

  • It has no unnecessary features like

    • Template caching - which exchanges speed for memory usage and adds complexity. This is premature optimization. The simpler library will be faster by design.

    • There are no fancy callback features to tempt developers to write complicated code. It’s only going to work with an array of data.

    • No if statements if data isn’t present - encouraging separation of concerns.