Properties

Ary Borenszweig ary at esperanto.org.ar
Thu Jan 8 09:39:14 PST 2009


Michiel Helvensteijn wrote:
> Ary Borenszweig wrote:
> 
>>>> get { return this.len; }
>>>> set { this.len = value; } // "value" (like in C#), or "$" or something
>>>> like that
>>> I have to disagree. By that logic, we would abolish parameter-names
>>> altogether and access formal parameters by number. set has a parameter,
>>> and the programmer should be able to name it.
>> 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



More information about the Digitalmars-d mailing list