https://docarchives.dlang.io/v2.073.0/spec/struct.html#struct-literal

I would like to set function's default struct for a function in a way that it would be visible for the reader to see what options are set. Something like `Options option = {silenceErrors: false}`


Here is an example of what I would hope for to work but it surely does not work:

```
import std.stdio;

struct Options {
    bool silenceErrors = false;
}

void someFunction(Options option = {silenceErrors: false}){
        writeln(option);

}

void main() {
        someFunction();
}
```

Is it possible to make this part work in a simple way, maybe I'm using a wrong syntax here?
```
void someFunction(Options option = {silenceErrors: false}){
        writeln(option);

}
```

Reply via email to