D's greatest mistakes

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Nov 29 13:11:27 PST 2010


On 11/29/10 3:02 PM, Walter Bright wrote:
> Andrei Alexandrescu wrote:
>> Syntax is the main issue in implementing this feature. Due to the
>> implicit nature of reference semantics for classes, there was no
>> syntax to distinguish between the head and the tail when qualifying.
>>
>> FWIW I just thought of this syntax. It might work but it's not intuitive:
>>
>> const()C tailConst;
>
> Syntax was not the issue. Back when we tried hard to make this work,
> there were many syntaxes proposed for it. The issue is the semantic
> conflation between a reference and what it refers to.

s/semantic/syntactic/

It was a syntactic issue. Semantically it is self-evident what operation 
is on the reference itself vs. the referenced data.

Andrei


More information about the Digitalmars-d mailing list