property syntax strawman

Walter Bright newshound1 at digitalmars.com
Sun Aug 2 02:45:06 PDT 2009


Zhenyu Zhou wrote:
> Walter Bright Wrote:
>> but oops! That defines a field. So we came up with essentially a hack:
>>
>>    bool empty{}
> 
> weird syntax

I agree, it's a wart.


> I'd rather use 
> 
>    bool empty=() { ... }
>    void empty=(bool b) { ... }

I suggested that, but Andrei thought it looked unintuitive, and he has a 
point.



More information about the Digitalmars-d mailing list