I've been expermenting with Mustache under the hood lately, so I'm interested in template implementations. It seems odd, you've chosen an odd middle-ground of "support arithmetic" and "no real heavy logic".
Having played with the subject a few times, I've come to the general feeling that it's best to choose a hard line on one side or the other - either the mustache "pure logicless" or just do straight string interpolation (assuming the language provides a good syntax for multi-line string interpolation - C# almost does except that you have to escape all your quotes. Dunno if other languages to better).
Any particular reason why you chose to support some logic instead of none or all?
C#6 string interpolation is glorious, but if you use the multiline
var myString = $@"
Hey, string interpolation is nifty.
Look ma, no { this.Hands.ToString().ToUpper() }
More text.
But this is a ""quote"". It's ""ugly"" isn't it?
";
As you can see, you need to double your double quotes to escape them. Almost perfect. You can even nest string interpolations to do next template stuff with functional-programming loops and whatnot.
Neat! With facilities like that, Id be tempted to skip templating libraries altogether and just have a normal interface for templates and use the regular string expressions... Unless I needed then internationalized, and that's where Mustache shines, IMHO.
Having played with the subject a few times, I've come to the general feeling that it's best to choose a hard line on one side or the other - either the mustache "pure logicless" or just do straight string interpolation (assuming the language provides a good syntax for multi-line string interpolation - C# almost does except that you have to escape all your quotes. Dunno if other languages to better).
Any particular reason why you chose to support some logic instead of none or all?