Is the -property compiler flag broken/bad idea?
    Diggory 
    diggsey at googlemail.com
       
    Thu Jun  6 04:31:02 PDT 2013
    
    
  
On Thursday, 6 June 2013 at 10:38:27 UTC, Martin Primer wrote:
> What would be good is:
>
> @property int foo {
>     get() {
>         _val = value;
>     }
>     set() {
>         value = _val;
>     }
> }
>
> usage:
>
> foo = 12;
> int bar = foo;
>
>
> my 2 cents.
That's both much more limited and longer than the current syntax. 
It also turns properties from a simple rewrite rule into a full 
language feature, and it doesn't seem to give any benefits?
    
    
More information about the Digitalmars-d-learn
mailing list