Array, AA Implementations
Denis Koroskin
2korden at gmail.com
Wed Oct 21 14:49:13 PDT 2009
On Thu, 22 Oct 2009 01:35:49 +0400, Yigal Chripun <yigal100 at gmail.com>
wrote:
> On 19/10/2009 23:42, Andrei Alexandrescu wrote:
>> Yigal Chripun wrote:
>>> here's an example of a well designed, consistent API:
>>> http://www.gobosoft.com/eiffel/gobo/structure/index.html
>>
>> This is a solid framework, unlike Java's containers which are a joke. I
>> disagree with some of Gobo's abstractions (e.g. I believe all containers
>> must be traversable and that primitives such as count() have no place in
>> a general container) but generally the framework seems to be very well
>> put together. It's a great source of inspiration for Phobos. Thanks very
>> much for the link.
>>
>> Andrei
>
> My understanding of this design is that they identified all the
> orthogonal properties relevant to containers and that specific
> containers are a composition of a specific set of such properties.
> Eiffel has MI (different from the c++ implementation) which is helpful
> if you already have suitable default implementations for these
> properties.
>
> regarding "traversable" property:
> what if I want a container for a non-ordered type? an example would be a
> container of complex numbers, how would you traverse it?
>
> what about hash tables?
>
What's wrong with iterating over a hash table? An order is just unreliable
(but still deterministic).
More information about the Digitalmars-d
mailing list