std.container update - now Array is in

Steven Schveighoffer schveiguy at yahoo.com
Fri May 28 13:09:24 PDT 2010


On Fri, 28 May 2010 16:03:10 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 05/28/2010 02:51 PM, Steven Schveighoffer wrote:
>> On Thu, 27 May 2010 21:08:29 -0400, Andrei Alexandrescu
>> <SeeWebsiteForEmail at erdani.org> wrote:
>>
>>>
>>> http://erdani.com/d/phobos/std_container.html
>>> http://erdani.com/d/phobos/container.d
>>>
>>> I defined Array as a straightforward implementation of the homonym
>>> abstraction. There are a few imperfect corners, but by and large I'm
>>> starting to believe it's becoming possible to write certain
>>> cross-container codes.
>>
>>
>> I just noticed, there is no doc for ElementType, only ValueType and
>> KeyType.
>>
>> -Steve
>
> I figured out that ElementType is actually unneeded - introspection can  
> extract it for you, see std.range.ElementType.

Well, the docs still use ElementType everywhere.  I don't really know how  
it would be introspected, what common function are all containers expected  
to implement (analogous to front() in a range)?

The only thing I would suggest is that having ElementType or something  
equivalent, would help with documentation, since ddoc would be immune to  
said introspection.

-Steve


More information about the Digitalmars-d mailing list