On Thu, Jan 8, 2009 at 5:55 AM, Rich Hickey <richhic...@gmail.com> wrote:
> The
> promise of the abstraction is not merely that the nth item/rest will
> be equal - it is that it will be identical. I.e. a seq is persistent
> and immutable.

I get that Clojure is making a promise of identity here, which is not
possible if things uncached.  But I look at this from a pragmatic
standpoint and wonder how much people are relying on that promise?  I
notice that I haven't written any code that uses identical?  And if I
did, I don't think I'd mind the overhead of explicitly wrapping the
sequence in a call to cache-seq.  If people don't need this promise as
a rule, maybe it's okay to rethink the abstraction, and start thinking
of it as just a way to get the "first" and "rest" of a bunch of items,
possibly generated by need, and with no other promises implied.

As to your question, I'd vote for streams now.  As you can tell from
my posts, my own code centers around generating long sequences of
things, and the current seq abstraction is just not quite the right
fit.  I'd really like to get my hands on streams and see whether they
work better for my needs.

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