Named Parameters (Was: A nice way to step into 2012)
Timon Gehr
timon.gehr at gmx.ch
Wed Dec 28 18:46:32 PST 2011
On 12/29/2011 03:38 AM, bearophile wrote:
> Timon Gehr:
>
>> On 12/29/2011 02:04 AM, Derek wrote:
>>> On Thu, 29 Dec 2011 10:48:57 +1100, Timon Gehr<timon.gehr at gmx.ch> wrote:
>>>
>>>> Having parameter names contribute to the interface means that all
>>>> developers need to spend time thinking about the best possible names
>>>> for their function parameters.
>>>
>>> And that's a bad thing, right?
>>
>> If the time was better spent at creating functionality, yes.
>>
>> http://www.digitalmars.com/d/archives/digitalmars/D/Rename_std.string.toStringz_138740.html
>>
>> http://www.digitalmars.com/d/archives/digitalmars/D/Fixing_enum_names_in_Phobos_141507.html
>>
>> http://www.digitalmars.com/d/archives/digitalmars/D/std.getopt_suggestion_145648.html#N145648
>>
>> http://www.digitalmars.com/d/archives/digitalmars/D/renamepalooza_time_127446.html
>
> I don't agree. Names are among the most important things in a human mind, if you find the right names, API usability improves. Thinking about the best names is time well spent, especially for library functions used by a lot of all kind of people for a lot of time.
>
> Bye,
> bearophile
My point is, without named arguments you can improve the names at any
time. With named arguments, you are stuck and have to get it right upfront.
More information about the Digitalmars-d
mailing list