[Mono-dev] Trivial Enumerable Optimizations

Avery Pennarun apenwarr at gmail.com
Fri May 9 11:27:17 EDT 2008


On 5/9/08, Jonathan Pryor <jonpryor at vt.edu> wrote:
> If the developer asks for a count, we have an obligation to provide a
>  count.  Throwing an exception claiming "You're a moron to ask about size
>  on a collection this big" should not be acceptable.

But if a programmer is working on a collection that ought to be able
to provide an O(1) count, and it normally does, but suddenly it
doesn't and decides to count through 2+ billion records, the data
structure's contract has already been broken.  We're only talking
about what kind of phone call the developer gets when his app doesn't
work, not about actually making it work :)

Have fun,

Avery


More information about the Mono-devel-list mailing list