Pretty please: Named arguments

Stewart Gordon smjg_1998 at yahoo.com
Mon Feb 28 17:53:13 PST 2011


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.


More information about the Digitalmars-d mailing list