On Jan 8, 2009, at 1:06 PM, Mark Engelberg wrote:

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

I think the real test of non-cached seqs is to swap them in for  
regular seqs, rebuild Clojure and some user libs and see what breaks  
and why. Then you'll see the dependencies on caching that exist in the  
real world. Your purely functional code might not care, other than  
perf, but that is not the only user base Clojure and I need to support.

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

Reply via email to