On Thursday, 17 September 2020 at 12:59:05 UTC, Mike Parker wrote:
On Thursday, 17 September 2020 at 12:58:06 UTC, Mike Parker wrote:
DIP 1030, "Named Arguments", has been accepted.


https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1030.md

Fantastic news.

The fact that it is a caller decision to use or not names emphasizes the D "syntax sugar" oriented conventions (like "dot notation"): same method can be called using the way it fits better with your on convention.

countOcurrences("hello", "e");
"hello".countOcurrences("e");
"hello".countOcurrences(of:"e"),
countOcurrences(of:"e", in:"hello");

I use rdmd as scripting tool, and I have to say that I will adopt immediately named parameters usage: in addition to scope(...), ranges and the simplicity/power of the standard library, D becomes an expressive and powerful scripting language.

Reply via email to