Named Parameters (Was: A nice way to step into 2012)
Derek
ddparnell at bigpond.com
Thu Dec 29 00:39:05 PST 2011
On Thu, 29 Dec 2011 19:08:36 +1100, Don <nospam at nospam.com> wrote:
> On 29.12.2011 04:48, David Nadlinger wrote:
>> On 12/29/11 3:46 AM, Timon Gehr wrote:
>>> 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.
>>
>> My point is, without positional arguments you can improve the ordering
>> at any time. With positional arguments, you are stuck and have to get it
>> right upfront.
>>
>> David
>
> That's rubbish! Unless you plan to disallow positional arguments...
Maybe you missed the point?
I see the point in David's response as being that regardless of whether we
have positional or named parameters, once exposed, they are pretty well
set in concrete. I think that no one is suggesting that position
parameters are to be replaced by named ones. The upshot of the idea would
be that a API user would be free to choose between whatever *they* felt
was appropriate.
--
Derek Parnell
Melbourne, Australia
More information about the Digitalmars-d
mailing list