seeding the pot for 2.0 features
BCS
ao at pathlink.com
Mon Feb 5 15:24:28 PST 2007
Reply to doob,
> I think it would be good to add a "property" keyword and maybe also
> "get" and "set". I think also would be nice to add a feature from ruby
> that i think works something like this:
>
befor I'd go for that it rather see const aliases
class C
{
private int foo;
const alias Foo;
}
C c = new c;
auto cf = c.Foo; // valid
c.Foo = 2; // invalid
auto cf = &c.Foo; // invlaid
That covers the get side, and what use is the set side if you don't provide
code? (Overriding maybe??)
I /like/ the property syntax D uses and would hate to see it discarded.
More information about the Digitalmars-d
mailing list