Discussion Thread: DIP 1030--Named Arguments--Final Review
Steven Schveighoffer
schveiguy at gmail.com
Wed May 13 19:31:24 UTC 2020
On 5/13/20 3:30 PM, Walter Bright wrote:
> 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);
And how does the implementation of copy use that first parameter?
-Steve
More information about the Digitalmars-d
mailing list