named arguments (C++) - Something D could learn from

Matthew OConnor thegreendragon at gmail.com
Sun Dec 16 22:16:28 UTC 2018


On Friday, 14 December 2018 at 20:13:42 UTC, bauss wrote:
> In C++ you can achieve named arguments using templates and 
> operator overload:
>
> It's sad that D is still against having named arguments, but 
> it's possible in something that D thrives to be better than.
>
> https://www.fluentcpp.com/2018/12/14/named-arguments-cpp/
>
> I assume this is not possible to port to D because D doesn't do 
> operator overload in the same way C++ does, correct?
>
> I still think named arguments should be something to consider 
> implementing for D, but since everything requires a DIP and 
> it's very hard to write a DIP that's proper for such a thing 
> then I guess it'll just be a dream, forever.

I am a C++ developer by day and reading that article made me 
cringe. C++ has this creeping, expansive, everything ends up in 
the language or writable in it, if you accept awful messages and 
contorting the syntax. I hope D doesn't go down that route.


More information about the Digitalmars-d mailing list