named arguments, string interpolation, please stop.

Timon Gehr timon.gehr at gmx.ch
Thu Jan 11 22:56:21 UTC 2024


On 1/11/24 23:37, Richard (Rikki) Andrew Cattermole wrote:
> On 12/01/2024 11:33 AM, Timon Gehr wrote:
>> If you do that D can no longer correctly implement a higher-order 
>> function that forms the composed function from its two arguments. It 
>> looks good on paper for a few minutes, but this is not a good solution 
>> to apply by default.
> 
> Unless we get something different that solves the same premise, opt-in 
> is fine.
> 
> I'm thinking explicitly for things like ``opApply``. Having giant mixin 
> templates that handle all combinations is far worse.

Yes, attribute polymorphism is needed for that case, but currently there 
is no way to abstract over attributes and this is invariably the point 
where language features become a bit too esoteric for people (both 
language designers and users) who are not type system experts and then 
ad-hoc hacks proliferate.


More information about the Digitalmars-d mailing list