named arguments (C++) - Something D could learn from

JN 666total at wp.pl
Wed Dec 19 15:07:48 UTC 2018


On Wednesday, 19 December 2018 at 13:30:57 UTC, Kagamin wrote:
> https://blog.jetbrains.com/dotnet/2018/11/27/inline-parameter-name-hints-c-vb-net-resharper-rider/ resharper 2018 just overlays parameter names right in editor window.

I think there are two usecases that are kind of getting mixed 
here, correct me if I'm wrong. Named/keyword arguments provide 
two benefits:

1) you know what the arguments mean at the call place
2) you can make optional arguments without making multiple 
function overloads or using something like the Builder pattern

This fixes 1) but doesn't fix 2)


More information about the Digitalmars-d mailing list