On 16/05/13 13:56, AtKaaZ wrote:
In a way I'm in his shoes, but I always assumed that the user would
use binding even if that meant encompassing the whole program in it.
personally, I find it rather unpleasant to depend on a lib that forces
me to use 'binding' in such a top-level fashion...Clojure does this
internally to provide convenience knobs for certain static resources
(e.g. *in* & *out*) and for vars that don't really get involved in your
business logic (e.g. *warn-on-reflection* & *unhecked-math*) but I don't
think I've ever seen code that binds these "from top to bottom". *in* &
*out* usually appear in a limited 'binding' expression (2-3 lines) and
*warn-on-reflection* & *unhecked-math* usually appear to be set at the
top of a namespace. For state that your actual logic depends on, people
seem to be in favour of atoms (including myself) or in fact any
reference-type depending on your use-case semantics....It just is more
transparent... :)
that said, I think the OP is not looking for state but for polymorphic
behavior...hence, my previous suggestion.
Jim
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.