Pretty please: Named arguments
Nick Sabalausky
a at a.a
Mon Feb 28 21:24:06 PST 2011
"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
news:ikhtn9$2ea1$1 at digitalmars.com...
> On 2/28/11 7:53 PM, Stewart Gordon wrote:
>> On 01/03/2011 01:29, Bekenn wrote:
>>> On 2/28/11 4:50 PM, Stewart Gordon wrote:
>>>> But one way around that would be to support
>>>> parameter aliases, which would also confer a few more benefits.
>>>
>>> Interesting idea. I think this might solve Jonathan Davis's main
>>> complaint; could you give
>>> an example of what syntax for that might look like?
>>
>> I don't know, but possibly
>>
>> void setColour(int colour alias color);
>>
>> and with a possibility of deprecating old names
>>
>> int find(string haystack deprecated alias s1, string needle deprecated
>> alias s2);
>>
>> Stewart.
>
> Don't know about others, but I think this is exactly the point where my
> "meh" detector goes off.
>
std.algorithm has far worse signatures. The main problem I have with the
above is that it only solves a barely-existent "problem".
More information about the Digitalmars-d
mailing list