Properties

Bill Baxter wbaxter at gmail.com
Thu Jan 8 18:03:49 PST 2009


On Fri, Jan 9, 2009 at 10:58 AM, Nick Sabalausky <a at a.a> wrote:
> "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.

Wow.  You're right.  Maybe I need to change my font or something.
Sorry for the rant about returning lvalues then!

--bb



More information about the Digitalmars-d mailing list