Richard---
   It's not the same thing:

(class (doall (map (fn [x] x) [1 2 3])))
-> clojure.lang.LazySeq

whereas

(class (binding [*strict* true]
   (map (fn[x] x) [1 2 3])))
-> clojure.lang.LazilyPersistentVector

Also, having a dynamic var that turns laziness on and off would allow
you to do it once for any given scope, without having to add the extra
'ceremony' of doalls.  To quote Mark Engleberg:

"If you want to choose code simplification over laziness,
it's not always even clear how to do that safely.  For example, it's
not uncommon to end up with lazy sequences of lazy sequences [...],
and then a single doall isn't going to the trick.  Wrapping
doall around every single call in your code is unrealistic. "

I would add to that that casting your types back to what they were is
also unrealistic.

If there were a *strict* dynamic var, then you \could choose code
simplification over laziness with a single line.  What would be wrong
with that?

-- 
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

Reply via email to