Properties

Michiel Helvensteijn nomail at please.com
Thu Jan 8 10:11:07 PST 2009


Ary Borenszweig wrote:

>>> It's very different. A setter has a very specific meaning: set some
>>> value. That's why it's called "value". Another name could be the name of
>>> the property ("len") or something like "newLen". Which other name would
>>> you use?
>> 
>> It's not for me to say. It should be up to the programmer.
>> 
>> You've already shown that there are at least three possibilities.
> 
> Yes, three. And that's it. That was my point. And they all have pretty
> much the same meaning.
> 
> Well, unless you want to name it "nuevaLen", "novaLen", "nouvelleLen",
> etc. :-P

Perhaps the implicit declaration "value" (or whatever *you* would call it)
inadvertently overshadows a member variable with that name. That could
result in a bug that would be pretty hard to find.

-- 
Michiel




More information about the Digitalmars-d mailing list