Discussion Thread: DIP 1030--Named Arguments--Final Review

Walter Bright newshound2 at digitalmars.com
Wed May 13 19:30:37 UTC 2020


On 5/13/2020 12:55 AM, Jacob Carlborg wrote:
> Regarding renaming parameters will break the API. Swift supports giving a 
> different name which are used locally:
> 
> func copy(_ source: String, to destination: String)
> 
> Should be called like this:
> 
> copy("foo", to: "bar")
> 
> `_` indicates that the argument can not be named when calling the function.

In D, we do:

    void copy(string, string destination);


More information about the Digitalmars-d mailing list