DIP 1019--Named Arguments Lite--Community Review Round 1

Yuxuan Shui yshuiv7 at gmail.com
Mon Mar 4 12:00:54 UTC 2019


On Sunday, 3 March 2019 at 09:36:32 UTC, Joseph Rushton Wakeling 
wrote:
>
> Note that this would be simpler from a developer point of view 
> if it was possible to declare "anonymous" structs in place in 
> the function declarations, i.e.:
>
>     int foo (struct { int w = 10; int h = 10; });
>     int bar (struct { int w = 20; int h = 20; });
>
> ... which combined with the earlier suggestion would also be a 
> fairly natural extension of existing struct syntax.

I think this approach gives every parameter a default value, and 
thus make them all optional. Which is not necessarily desirable.




More information about the Digitalmars-d mailing list