Properties

Nick Sabalausky a at a.a
Thu Jan 8 17:58:42 PST 2009


"Bill Baxter" <wbaxter at gmail.com> wrote in message 
news:mailman.343.1231465331.22690.digitalmars-d at puremagic.com...
> On Fri, Jan 9, 2009 at 9:59 AM, Miles <_______ at _______.____> wrote:
>> Nick Sabalausky wrote:
>>> A property setter is ALWAYS going to return nothing and
>>
>> Both the getter and the setter should return an rvalue. Properties exist
>> so that they are interchangeable with real member variables.
>
> Partly, but also properties exist to provide encapsulation of private 
> state.
> So you gotta be careful when you say they should always return an lvalue.

He said "rvalue", not "lvalue". I actually made that same mistake the first 
couple times I read it. 





More information about the Digitalmars-d mailing list