|
|
|
|
|
by kevincox
1371 days ago
|
|
You can, but it is a mouthful. Especially if you want optional arguments. foo::some_func(foo::SomeFuncArgs{
a: 8,
b: Some(false),
..Default::default()
})
Personally I would be really happy if `..` could default to `..Default::default()` which would make this a lot cleaner. But even then needing to name a type for the argument struct is noisy. Language-integrated keyword arguments would make this a lot cleaner: foo::some_func(
a=8,
b=Some(false))
|
|