CTFE implementation

Bjoern nanali at nospam-wanadoo.fr
Fri Feb 8 09:59:19 PST 2008


Frank Benoit schrieb:
> I want to initialize constant GUID structure instanzes in D1. This is 
> part of doing a port, so i want to keep most of the original code 
> unchanged.
> 
> In Java:
> public static const GUID IIDJavaBeansBridge = 
> IIDFromString("{8AD9C840-044E-11D1-B3E9-00805F499D93}");
> 



> This is in Java no problem, IIDFromString is executed at startup.


Why not using a module constructor
module dwx.guid;
static this()
{
   // all GUID init stuff (*IIDFromString ) goes here
}
...
I am very afraid I miss something. so it's just an idea.



More information about the Digitalmars-d-learn mailing list