Array, AA Implementations

Yigal Chripun yigal100 at gmail.com
Wed Oct 21 14:35:49 PDT 2009


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?




More information about the Digitalmars-d mailing list