Getting rid of global cdtors
Mathias LANG
geod24 at gmail.com
Mon Jun 15 02:37:20 UTC 2020
On Sunday, 14 June 2020 at 18:53:52 UTC, Andrei Alexandrescu
wrote:
> Getting rid of static cdtors is a good goal for druntime and
> standard library. Modules that need initialization should do so
> lazily upon first use.
>
> I picked a low-hanging fruit in
> https://github.com/dlang/phobos/pull/7529 - there is no need at
> all to initialize and test pointers to function in Posix.
>
> Could a Windows engineer help with the Windows part? It's a bit
> more involved - the pointers to functions should be initialized
> upon first use in a Singleton manner, and atexit(WSACleanup)
> needs to be inserted right after the call to WSAStartup.
>
> (BTW, has wine support been maintained? It would be useful for
> such cases - I could test the Windows code without an
> installation.)
Microsoft offers free images for developers. They have a lifespan
of 3 months IIRC, and come with Visual Studio / VSCode installed:
https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/
More information about the Digitalmars-d
mailing list