Pretty please: Named arguments

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 28 20:43:44 PST 2011


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.

Andrei


More information about the Digitalmars-d mailing list