On Monday, 11 February 2019 at 22:32:59 UTC, Vladimir Marchevsky
wrote:
On Monday, 11 February 2019 at 17:03:36 UTC, Atila Neves wrote:
import kwargs;
struct Foo { string value; }
struct Bar { string value; }
struct Baz { string value; }
size_t funImpl(in Foo foo, in Bar bar = Bar("lebar"), in
On Monday, 11 February 2019 at 17:03:36 UTC, Atila Neves wrote:
import kwargs;
struct Foo { string value; }
struct Bar { string value; }
struct Baz { string value; }
size_t funImpl(in Foo foo, in Bar bar = Bar("lebar"), in Baz
baz = Baz("lebaz")) {
return foo.value.length + bar.value.lengt
https://code.dlang.org/packages/kwargs
There have been many posts asking about keyword arguments for D a
la Python. Usually I reply saying to just use the type system,
but that has the incovenience of having to pass all 7 parameters
before the optional 8th one you actually care about despite y