function argument 'shorthand'

Roberto Mariottini Roberto_member at pathlink.com
Fri May 26 01:14:53 PDT 2006


In article <e53f58$15dc$1 at digitaldaemon.com>, Bill Baxter says...

>
>So what about a semi colon or colon or something instead of the comma?
>
>int foo(int x ; y, float z);
>int foo(int x : y : z);

My old proposal was to use a colon to disambiguate declarations. So

int foo (int x, int y, int z, float value);

could also be written as:

int foo (int : x, y, z; float value);

My proposal went further, forcing to use a colon for multiple declarations:

int a;         // OK
int b, c;      // error
int : d;       // also OK
int : e, f, g; // OK

Ciao

---
http://www.mariottini.net/roberto/



More information about the Digitalmars-d mailing list