Abstractioning away main/winMain
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 4 22:55:49 PDT 2015
On Saturday 05 September 2015 07:52, anonymous wrote:
> This doesn't work because delegates and static initialization don't go
> together. You can use a static constructor:
>
> ----
> const Application MyApp;
> static this()
> {
> Application.New({import std.stdio; std.stdio.writeln("MY APP IS
> COOL");
Should be: MyApp = Application.New({...});
> });
> }
> ----
More information about the Digitalmars-d-learn
mailing list