DIP 1020--Named Parameters--Community Review Round 2
rikki cattermole
rikki at cattermole.co.nz
Thu Sep 12 11:36:49 UTC 2019
On 12/09/2019 11:25 PM, Yuxuan Shui wrote:
> On Thursday, 12 September 2019 at 09:17:54 UTC, rikki cattermole wrote:
>> On 12/09/2019 4:57 AM, Paul Backus wrote:
>>> [...]
>>
>> There is no reason to believe that Phobos cannot be updated nor other
>> existing libraries.
>>
>> Deprecate old prototype.
>>
>> Add new prototype.
>>
>> Old prototype calls new prototype.
>
> Does that essentially mean we are going to rename all the functions?
Of course not.
Overloading of symbols is a great thing ;)
We only need to do it incrementally for functions/templates where it
makes sense. Not everything would benefit from named parameters.
E.g.
void func(int something, int flag = 0)
becomes
deprecated("Use named arguments version")
void func(int something, int flag) {
func(something, flag: flag);
}
void func(int something, @named int flag = 0)
More information about the Digitalmars-d
mailing list