DIP 1020--Named Parameters--Community Review Round 2

rikki cattermole rikki at cattermole.co.nz
Thu Sep 12 09:17:54 UTC 2019


On 12/09/2019 4:57 AM, Paul Backus wrote:
> On Wednesday, 11 September 2019 at 16:00:13 UTC, rikki cattermole wrote:
>> On 12/09/2019 3:12 AM, 12345swordy wrote:
>>> What good is named arguments if around 90% libraries don't support it?
>>
>> I won't put a percentage on the number of libraries that will not 
>> support it. Over time the number should decrease as people get use to 
>> it and find ways to use it to suit their style.
> 
> Given that adding @named to an existing parameter would be a breaking 
> change, it's unlikely any existing libraries--including existing Phobos 
> modules--will be updated to support named arguments. Only new libraries 
> written after DIP 1020 is implemented and released will be in a good 
> position to take advantage of it.
> 
> This is a major downside to DIP 1020 compared to both Walter's proposal 
> and DIP 1019 ("Named Arguments Lite"), which would work seamlessly with 
> existing code.

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.

No more Flag nonsense and will be fairly easy to implement.


More information about the Digitalmars-d mailing list