Keyword arguments done right (in Clojure)
stuartsierra.com
stuartsierra.com
I opened a ticket so let-kw would be considered for clojure-contrib inclusion (http://www.assembla.com/spaces/clojure-contrib/tickets/51-Ad...). The actual (final) macro source is posted on the Clojure mailing list (http://groups.google.com/group/clojure/msg/3ee695696c5ea1ec).
2. Most keyword arguments for Clojure's built-in functions follow the calling convention which let-kw makes easy, whereas the pass-in-a-separate-map convention is not used in clojure.core anywhere (that I can think of).
3. I've heard this type of anti-DSL argument before, but no one making it has ever linked to a (source-available) project where this caused a problem. Frankly, I've never heard of a dailywtf-type horror story about this, either. Do you actually have some evidence to support your view?
(paginate '/search' 10
;; optional keyword args
nextcopy "Next →" prevcopy "← Prev"
:do
;; body
(preprocess docs)
(each doc (cut docs start-index end-index)
(render-doc doc)))
More details: http://arclanguage.org/item?id=10692