The future of UDAs.
Jacob Carlborg
doob at me.com
Thu Nov 29 12:52:26 PST 2012
On 2012-11-29 18:35, Andrei Alexandrescu wrote:
> There are plenty of patterns for solving order of initialization issues
> in libraries, known since time immemorial. Requiring a library
> initialization call would be the simplest (albeit not the most elegant).
> The Monostate and Singleton patterns also come to mind.
>
> This is just not something that has no solution. Better solutions are
> always welcome, but keeping a baseline is always useful.
Another standard solution is to use functions which lazily initialize
some value.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list