On 2013-07-11 04:55, "Luís Marques" <[email protected]>" wrote:

A case where such reasoning would not apply is when source code
compatibility is not enough, such as when you have a D library. But this
could be solved by something like...

     class X
     {
         @property public int phone;
     }

...which would under the covers generate getter and setter properties,
so that if you later wanted to encapsulate it without breaking binary
compatibility you could do so.

I would really like to have this. It's like in Scala, all public fields are implemented with methods.

--
/Jacob Carlborg

Reply via email to