How about "auto" parameters?

Walter Bright newshound2 at digitalmars.com
Tue Jun 7 10:59:30 PDT 2011


On 6/7/2011 5:11 AM, foobar wrote:
> Types are already inferred for delegate literals so why not extend this to regular functions too?

Because of this:

int foo(T1 a, T2) { ... do something with a ... }

which is a common idiom for the second parameter existing but not being used in 
the function body.

In other words, existing practice holds that identifier T2 is presumed to be a 
type name, not a parameter name.



More information about the Digitalmars-d mailing list