DIP 1030--Named Arguments--Community Review Round 1 Discussion
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Tue Feb 11 06:06:38 UTC 2020
On Friday, 7 February 2020 at 03:33:26 UTC, Jonathan M Davis
wrote:
> Once in a while, named arguments may be useful, but for the
> most part, they're useful because a function has way too many
> parameters, in which case, the function should have been
> designed differently.
I've had the opportunity to design some methods relying on named
arguments in C#. I've come to the conclusion that this issue with
methods having too many arguments comes from parameters being
positional.
I find the old advice to package it into a structure as
pretending like you're reducing the number of arguments.
While a method with many arguments would indicate doing too many
things, but I think as you move up in the call stack you have to
add to all the different functionality you're trying to abstract
away.
More information about the Digitalmars-d
mailing list