Library settings, best practices?

Vladimirs Nordholm v at vladde.net
Mon Dec 10 08:45:01 UTC 2018


On Saturday, 8 December 2018 at 17:05:50 UTC, Adam D. Ruppe wrote:
> Alternatively, you could perhaps have it keep an internal 
> is_initialized flag and lazily call init on your other function 
> calls if it is not already done. Then if the user wants to 
> customize settings, they just call init before calling anything 
> else, and if not they skip the init call and it gets default 
> setup first time they try to use it.
I have not tried this approach before. This might be what I am 
looking for. Thanks :)


More information about the Digitalmars-d-learn mailing list