Beta 2.108.0

Anonymouse zorael at gmail.com
Wed Mar 20 15:38:19 UTC 2024


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.


More information about the Digitalmars-d-announce mailing list