memset and related things

Jeremie Pelletier jeremiep at gmail.com
Wed Sep 23 08:45:38 PDT 2009


Jarrett Billingsley wrote:
> On Wed, Sep 23, 2009 at 10:52 AM, Jeremie Pelletier <jeremiep at gmail.com> wrote:
>> I would love to see such a feature added in D, would make object composition
>> much more convenient and faster.
>>
>> You'd just need the compiler to force a call into C1's constructor within
>> C2's and generate a call to C1's destructor in the epilog of C2's. I can't
>> see how implementing idea that could be any harder, other than the parser
>> related support.
>>
> 
> You are really hung up on parsing, aren't you ;) Parsing is a tiny,
> tiny, tiny fraction of the complexity of implementing a language, and
> most language features do not require any change to it. Really.

Everything begins at parsing! You'd need to parse the scope lexeme in 
that context, then you'd need to adjust the appropriate parse node to 
contain the scope flag, which would require additional semantics 
analysis and finally a few changes in the IR generation. Thats what I 
implied by parser "related" support.

But yeah, I love parsing :)



More information about the Digitalmars-d mailing list