property syntax strawman

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Aug 2 22:52:25 PDT 2009


Robert Jacques wrote:
> On Sun, 02 Aug 2009 12:02:22 -0400, Andrei Alexandrescu 
> <SeeWebsiteForEmail at erdani.org> wrote:
> 
>> Jarrett Billingsley wrote:
>>> I think it's funny that for a week, Andrei has been arguing against
>>> throwing around new syntax to solve this problem, and that's exactly
>>> what you guys have come up with.  Really, how much more complicated
>>> would this make the parser, compared to adding a new attribute?
>>
>> We couldn't find a good solution without adding new syntax, so this is 
>> now on the table. Adding syntax or keywords is the next thing to look 
>> at. I'd still be unsatisfied if:
>>
>> (a) there would be significant syntactic noise to defining a read-only 
>> property
>>
>> (b) we had to add a keyword
>>
>>
>> Andrei
> 
> I'd also still like to be able to do stuff like this:
> 
> auto data = std.file.readText(filename).chomp.split;

I love that too. Unfortunately, the way the water is moving, it looks 
like we'll lose some or all of that.

Andrei



More information about the Digitalmars-d mailing list