Collections questions
J J
azreal1977 at hotmail.com
Tue Oct 3 17:53:09 UTC 2006
Hello all,
I was going through the collections today and I noticed something I was
currious about.
1. Why doesn't sorted collection over-ride any of the search messages (e.g.
occuranceOf:)? Since the data is sorted, I would think it would have a
chance for a more efficient search.
2. Is there a better way then making a message "select:upTo:"? In an
application I am writting, I provide an interface to a collection (of dates)
and one of the things you can do is ask for "nextDates: aNumber". The most
efficient way to impliment this, since my collection is ordered, would be if
I could go:
MyClass>>nextDates: aNumber
^ dates select: [ "some test" ] upTo: aNumber
Before I impliment this myself: is there some way that people do this
normally, and that's why no one has implimented this yet?
More information about the Squeak-dev
mailing list
|