I use destructuring most of the time, the main benefits I see are runtime 
validation
of typo errors in the option names, better doc strings and the ability to 
provide defaults
where nil does not make any sense.

Of course you may need to use apply to pass options in turn to another fn
but I found out that this happens most of the time internally, not in the 
public API.

Sub-selecting options with select-key makes things easier to read when pruning
options used by internal fns.

Marginally slower but less brain estate is required to remember valid options.

If the apply stuff gets repeatedly in the way, then use a macro to hide it.

Luc P.



--
Softaddicts<[email protected]> sent by ibisMail from my ipad!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to