On Jan 23, 9:35 am, Christophe Grand <christo...@cgrand.net> wrote:
> 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.
>
Good. Let's proceed with that and see how it feels.
Thanks to all for the good feedback - keep it coming!
Rich
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---