Rich Hickey a écrit :
> I think you lose the game overall. 
I'm sorry if I sounded provocative, I was trying to better understand 
the model you propose with streams. Thanks for your answer: it made 
thinks clearer to me.

> With what you are proposing:
>
> (if (seq astream)
>   (do-something-with (first astream))
>
> is broken.
>   
Indeed you're right: astream can change between the two calls to (seq 
astream).

> More generally, I guess I simply don't understand these use cases for
> treating the stream as a seq and subsequently mutating it. 
It's not a use case, it's the mere angst of nasty bugs basically due to:
  (seq astream)
  ...
  (stream-iter astream)
not raising an exception when someone inadvertently mixing seq fns and 
stream fns.

Now (rev 1228) I get an "Already iterating" exception so I'm happy.

Christophe

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