DIP23 draft: Fixing properties redux

Jacob Carlborg doob at me.com
Tue Feb 5 00:27:00 PST 2013


On 2013-02-04 23:52, Jonathan M Davis wrote:

> Which is why I would argue that we need to be able to mark variables with
> @property (which either makes it so that you can't do anything with them that
> you can't do with a property function or makes it so that it lowers to
> property functions for getting and setting), and we need to disallow taking
> the address of property functions as well as anything else that you could do
> with a variable that we can't emulate with a property function.

They need to be lowered to methods. Otherwise you cannot switch from a 
method to a field, since methods are virtual and can be overridden in 
unknown subclasses.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list