I always encounter the double mustache notation {{}} in JavaScript Template engine.
Why not only one?
I always encounter the double mustache notation {{}} in JavaScript Template engine.
Why not only one?
Probably because they want easily distinguish Javascript object notation (single parenthesis) from template-related variables/expressions (double parenthesis: {{}}).
It is about as much of an arbitrary design choice as can get. It definately wouldn't make sense to use {}
as this is standard object notation, and you can in fact find notation like this in your HTML code if you are using Knockout.js.
Template could be signified by any marking at all, <??>
, [[]]
,!><!
, and in fact most template engines you can customize to use those if you prefer.