On Saturday, 2 March 2024 at 17:40:29 UTC, Iain Buclaw wrote:
[...]

Named arguments for functions have been implemented and documented

Yay, I was really looking forward to this.

I currently use `std.typecons.Flag` virtually *everywhere* to make sure I don't confuse parameters.

```d
auto doThing(
    const string what,
    const Flag!"foo" foo,
    const Flag!"bar" bar,
    const Flag!"baz" baz = No.baz)
{
    // ...
}

auto thing = doThing("asdf", Yes.foo, No.bar, Yes.baz);
```

It will take some time adapting to but I welcome the addition.

Reply via email to