On Thu, Jan 17, 2019 at 10:29:13AM +0000, John Burton via Digitalmars-d-learn 
> Well window was just an example really, my real use case is a similar
> object that needs a lot of configuration where mostly the default
> works but you might want to override, and the config is needed to
> create the object in the first place.

When I encounter similar situations in my code, my go-to solution is to
use a struct with default field values as a configuration object that
you pass to the ctor. You can either pass .init to the ctor to get
default behavior, or declare an instance of the struct and customize as
you see fit before handing it to the ctor.


Reply via email to