Named Arguments Status Update
zjh
fqbqrr at 163.com
Sat Jan 6 01:33:12 UTC 2024
On Friday, 5 January 2024 at 09:48:53 UTC, Dennis wrote:
> Since dmd 2.103, named arguments for struct literals and
> regular functions, including overloads, have been implemented
> per [DIP 1030](dlang.org/dips/1030).
The purpose of `named parameters` is to solve the problem of the
`location of default parameters`, so I think it is necessary to
generate an `implicit name location correspondence` according to
the `parameter name` of the function, and then automatically
correspond to the corresponding location when calling.
```d
string f(T)(T x) { return "x"; }
string f(T)(T y) { return "y"; }
```
Here, the definition is conflicted!
More information about the Digitalmars-d
mailing list