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

rikki cattermole rikki at cattermole.co.nz
Tue Sep 24 20:05:04 UTC 2019

On 25/09/2019 7:57 AM, Dukc wrote:
> On Tuesday, 24 September 2019 at 17:15:51 UTC, rikki cattermole wrote:
>> That's not true.
>> The order is relative to the other named parameters except when no 
>> positional arguments follow.
> Hmm, sounds somewhat better. Well, the implementor can define the 
> parameters last if he wants to be free to reorder afterwards.

We are mixing terminology I fear.

Parameter = declaration side
Argument = caller side

Parameters can be in any order.
Named arguments must remain in order of the named parameter list until 
the last unnamed argument. After that its any order.

>> This DIP does not change ABI mangling since named parameters do not 
>> get mangled (they also don't get considered for overload resolution so 
>> that makes it possible).
> They do not have to be mangled, but the implementor might want to 
> generate a hash from named parameters to the mangling, to avoid linking 
> to a function that has different named parameters.

I've considered this, there is no benefit. Mangling is not a safety 
feature. It only exists to make symbol overloading possible.

>> Thanks, however Walter has killed this DIP so that's that I'm afraid.
> My symphaties. Ask Mike to mark the DIP postponed? Walter's DIP has not 
> yet passed the reviews, so there's always the possibility that someone 
> uncovers a major flaw. In that case, it's good to have a backup DIP.

There shouldn't be any major issues with his.
Apart from one or two invasive changes which he is more than capable of 
implementing himself (and maybe the only one I would trust doing it) its 
pretty light on features.

More information about the Digitalmars-d mailing list