DIP 1019--Named Arguments Lite--Community Review Round 1
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Fri Mar 1 13:37:24 UTC 2019
On Thursday, 28 February 2019 at 21:55:50 UTC, Olivier FAURE
wrote:
> No, it mentions that having two @named prototypes for the same
> functions with the same name and parameter types but different
> parameters is allowed.
>
> eg: This is forbidden:
>
> @named:
> int foo(int x, int y) { return x + y; }
> int foo(int w, int z) { return w + z; }
>
> and this is allowed:
>
> @named:
> int foo(int x, int y);
> int foo(int w, int z) { return y + z; }
>
> The next iteration should probably make that distinction
> clearer.
Is the idea here that you can effectively define "aliases" for
the parameter names (e.g. to help transitions), but not have
multiple function implementations with the same type signatures
and different names?
That presumably impacts back on the mangling question, and
whether the parameter names need to be included in the function
mangling ... ?
More information about the Digitalmars-d
mailing list