DIP4: Properties

Michiel Helvensteijn m.helvensteijn.remove at gmail.com
Sun Jul 26 09:15:46 PDT 2009


Daniel Keep wrote:

>> I used an example without trivial properties because... well, you just
>> use member variables for that. That's why I don't see real value in
>> adding default properties getter/setters.
> 
> interface I
> {
>     int opGet_value();
> }
> 
> You cannot use fields in an interface.

You do understand that properties with automatic backing storage would
probably also not be allowed in interfaces. They'd have the same memory
layout problems as fields.

-- 
Michiel Helvensteijn




More information about the Digitalmars-d mailing list