Is there a nice syntax to achieve optional named parameters?
Kagamin
spam at here.lot
Wed Jan 16 14:59:01 UTC 2019
On Tuesday, 15 January 2019 at 11:14:54 UTC, John Burton wrote:
> auto window = Window(title = "My Window", width = 1000,
> fullscreen = true);
In this particular case I would make the constructor take 3
parameters - title, width and height. Full screen is a rare
functionality and shouldn't clutter the constructor, can it be
set after the window is created?
More information about the Digitalmars-d-learn
mailing list