Top 5

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 11 07:55:19 PDT 2008


Denis Koroskin wrote:
> On Sat, 11 Oct 2008 18:32:25 +0400, Andrei Alexandrescu 
> <SeeWebsiteForEmail at erdani.org> wrote:
> 
>> Denis Koroskin wrote:
>>> On Sat, 11 Oct 2008 18:00:38 +0400, Andrei Alexandrescu Two notes:
>>> 1) I thought Appender would have an 'append' method as well as 
>>> opCatAssign.
>>
>> Appender has write because it is an output range. That way you can 
>> direct any algorithm that uses output iterators to append to an array.
>>
> 
> BTW, I wouldn't know that Appender is a range if you didn't say it. I 
> believe it should be specified (and enforced) somehow in the code, like 
> 'implements the output range contract' (C++0x contracts come to mind). 
> For example, an error could be risen if Output Range definition is 
> changed and Appender is not updated yet.

Walter is considering allowing structs to inherit from interfaces.

Andrei



More information about the Digitalmars-d mailing list