Introducing vibe.d!
    Jacob Carlborg 
    doob at me.com
       
    Sun Apr 29 23:22:49 PDT 2012
    
    
  
On 2012-04-29 20:29, Sönke Ludwig wrote:
> You just don't have to care about how to parse command line arguments,
> how to initialize the library and to start the event loop.
Right, didn't thought of that. Would it be a good idea to allow top 
level code and use "import" and mixin the code in some context, i.e. :
// foo.d
auto settings = new HttpServerSettings;
settings.port = 8080;
listenHttp(settings, &handleRequest);
Then somewhere:
// vibe.d
void main (string[] args)
{
     handleCommandLine(args);
     init();
     mixin(import("foo.d"));
}
-- 
/Jacob Carlborg
    
    
More information about the Digitalmars-d-announce
mailing list