DIP 1020--Named Parameters--Community Review Round 2
a11e99z
black80 at bk.ru
Thu Sep 12 14:51:29 UTC 2019
On Thursday, 12 September 2019 at 14:36:09 UTC, rikki cattermole
wrote:
> On 13/09/2019 1:44 AM, Yuxuan Shui wrote:
>> On Thursday, 12 September 2019 at 12:06:47 UTC, rikki
>> cattermole wrote:
>>> On 12/09/2019 11:50 PM, Yuxuan Shui wrote:
>>>> On Thursday, 12 September 2019 at 11:46:46 UTC, rikki
>>>> cattermole wrote:
>
> To support overloading on named parameters would require
> invasive changes and adding a new mangling sequence. Things I
> want to avoid.
>
I am not considering named template arguments now cuz me with
templates is not like a fish in water.
@named will be only in source code or .di files.
how and why @named should be involved in mangled names and method
selection?
why the following rules are bad:
- naming is not mandatory and
- method are selecting as usual by overload/UFCS rules and
need to check that named args satisfy @named args in found func
definition.
in other case probably user thought about another function.
----------------------
sux.
do what u want.
but please don't add mandatory @named to functions that can be
used in lambdas - map, fold, take, another hundred functions too.
cuz it will be shitty named mess.
More information about the Digitalmars-d
mailing list