DIP 1019--Named Arguments Lite--Community Review Round 1
Francesco Mecca
me at francescomecca.eu
Fri Feb 15 17:38:23 UTC 2019
On Friday, 15 February 2019 at 13:49:04 UTC, Atila Neves wrote:
> On Friday, 15 February 2019 at 12:56:45 UTC, Mike Parker wrote:
>> This is the feedback thread for the first round of Community
>> Review for DIP 1019, "Named Arguments Lite":
>>
>> [...]
>
> I'd add my library too as a possible library solution:
>
> https://github.com/atilaneves/kwargs
I think that the solution proposed by Atila is better for the
following reasons:
1. it is a library solution
2. allows both the user and the author of a library to specify
functions with named parameters
3. it is very lightweight
But it is not enough for the following reasons:
1. Works only on templates (I'd like someone to explain to me why)
2. Is opinionated about using ad-hoc types to represent data (the
opposite of http://wiki.c2.com/?PrimitiveObsession)
If there is a consensus against primitive obsessions I think it
would be better to solve point 1 and leave the decision to
library authors to implement named parameters function or users
to make their wrappers. This opt-in behaviour is not different
from what it is provided by the DIP
More information about the Digitalmars-d
mailing list