[elephant-devel] Best way of getting a collection size

Ian Eslick eslick at csail.mit.edu
Tue Oct 2 23:29:36 UTC 2007


That part of it is actually easy, your mixin just need to provide  
before: or after: operators on (setf get-value) and remove-kv (I  
think).  The challenge is not double counting replacement operations  
which may require an additional read, so good to keep this a mixin  
and only pay the cost when you need to.

If any ideas for a more efficient solution comes up, please share them!

Ian

On Oct 2, 2007, at 4:06 PM, Mariano Montone wrote:

> 2007/10/2, lists at infoway.net <lists at infoway.net>:
> Funny, but I will be coming across this same need very soon and, like
> Mariano, it would be great to get that information without having to
> traverse all the objects. I think the mixin class would be a great
> addition. Mariano, if you do give that a try, would you mind sharing
> it with the code and hopefully that will make it into future releases?
>
> No problem, but don't expect that I try that too soon. I still  
> consider myself kinda newbe in CL (although I have quite lots of  
> experience programming) and I'm busy trying to asimilate CL + CLOS  
> + UCW + Elephant. Besides, I haven't lurked through the Elephant  
> architecture yet.
>
> Mariano
>
>
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list