Curlier Moustache

2 views
Skip to first unread message

Christophe Grand

unread,
Feb 5, 2013, 7:28:55 AM2/5/13
to moustache-club
Hi,

Moustache is evolving at a geological pace. I've pushed a new syntax file http://cgrand.github.com/moustache/syntax.html and the necessary implementation changes.

The gist of the new syntax is that an app can is "map"-like. Keys can be options (:middlewares, :params, :handler and :response), HTTP methods (and :any) or routes. A value's type is dependent on its key.

Being map-like it also means that routes are now unordered! No more cascading behavior – in the modern syntax.

No breaking change though: the modern syntax is only triggered by a keyword in first position of the app form and in maps shorthand.

Rationale:
First: Moustache is sometimes a bit too terse. 
Second: I now believe that ordering is bad for composability and maintenability. Thus having a non-ordered syntax will allow to explore new possibilities without breaking existing ordered code.

Thanks for reading,

Christophe

--
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/
Reply all
Reply to author
Forward
0 new messages