Some more template syntax sugar

Reiner Pope reiner.pope at REMOVE.THIS.gmail.com
Sat Sep 2 13:26:12 PDT 2006


Walter Bright wrote:
> 2) Nameless parameters come up an awful lot in C/C++ header files - I 
> think they're expected.

I thought of that one, and since you want D to work in the same way as C 
and C++ when the syntax is the same, I figure you must keep nameless 
parameters working in the way they do.

That means that we need a modified typeless parameter syntax. I'm not 
sure which keywords and operators are available, but I think that @ 
isn't used. How about just sticking a @ into the syntax for typeless 
parameters to make it unambiguous.

auto foo(@x, @y, int) // x and y are typeless parameters, and the third 
paremeter is nameless.

Cheers,

Reiner



More information about the Digitalmars-d mailing list