Pretty please: Named arguments

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 28 22:15:41 PST 2011


On 2/28/11 11:24 PM, Nick Sabalausky wrote:
> "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".

It's not the signature I was mehing about.

Andrei



More information about the Digitalmars-d mailing list