Some more template syntax sugar

Don Clugston dac at nospam.com.au
Mon Sep 4 00:24:55 PDT 2006


Derek Parnell wrote:
> On Sat, 02 Sep 2006 13:14:31 -0700, Walter Bright wrote:
> 
>> Reiner Pope wrote:
>>> Thoughts, anyone?
>> 1) Lots of people like nameless parameters to implicitly document that 
>> the parameter isn't used.
> 
> And lots of people like named parameters to explicitly document the meaning
> of the parameters.

It would be better to be able to explicitly document that the parameter 
isn't used. Maybe by reusing the 'null' keyword.

int somefunc(int x, uint null)
{
}

>  
>> 2) Nameless parameters come up an awful lot in C/C++ header files - I 
>> think they're expected.
> 
> So what? This is D and not C/C++. If one is going to use a new language
> then one should be prepared to learn a few new things too.

It would add a lot more pain to converting C header files to D. For 
example, the Win32 API project, would require over ten thousand changes.




More information about the Digitalmars-d mailing list