Restrict Class Properties?

BCS BCS at pathlink.com
Mon Feb 12 10:32:45 PST 2007


Manfred Nowak wrote:
> Currently class properties are not restricted to in-parameters.
> 
> This means, that it is possible to assign to the RHS of "=".
> 
> class D{
>   void property( out int p){
>     p= 42;
>   }
> }
> auto d= new D;
> int x;
> d.property= x;
> 
> This seems to be surprising.
> 
> -manfred

Um, why not? Why is this a bad thing?



More information about the Digitalmars-d mailing list