List of (soft) recommendations or "best practices" for implementations #164
Replies: 2 comments 10 replies
-
I firmly believe a best practice is providing some data variable that is a boolean of Whether that is That is most Mustache implementations should provide a means to create a comma separated list without inducing an aneurism of having to dig in various complicated implementation tricks. In traditional HTML where you also have Javascript and CSS at play knowing first and last was not as important. Now that React and various Javascript frameworks have taken over a good portion of web site rendering Mustache's target output media I think is becoming more mixed and varied than just HTML. For example I use Mustache a great deal for Java/SQL code generation and code generation in so many cases requires generating a list separated by commas in them where a trailing Every time I reach for JMustache or now JStachio (both which have virtual keys) for this problem because it is not obvious how to do this instantly with Mustache.java (the other reason is JMustache/JStachio has more consistent whitespace). |
Beta Was this translation helpful? Give feedback.
-
#174 might be a subject for this list as well, although it probably deserves a hard rule in a 2.0 version of the spec. |
Beta Was this translation helpful? Give feedback.
-
The spec describes what an implementation should do in order to ensure that templates are portable. Besides that, there could also exist a more informal and optional list of guidelines, which describe how an implementation could make itself convenient for users. Credits to @bobthecow for suggesting this in #156 (comment).
Right now, I can think of three candidates for such a list:
If we were to make such a list, I think it should be "free for all", i.e., not subject to review or consensus. Partly because implementers are free to ignore the recommendations anyway, partly because we must not burden ourselves with new processes that need to be controlled. Everyone can add and nobody should remove.
I think the wiki might be a suitable place for such a list.
Beta Was this translation helpful? Give feedback.
All reactions