Article first draft: The Joy and Gibbering Terror of Custom-Loading

Robert Fraser fraserofthenight at gmail.com
Fri Feb 15 17:11:41 PST 2008


Burton Radons wrote:
> Dejan Lekic Wrote:
> 
>> Mr. Radons, this is *AMAZING* ! Thank you for sharing it with us! I 
>> would (seriously) like to see this in Phobos one day (hopefully Phobos 
>> developers are reading this thread). It deserves to go into Phobos, 
>> definitely.
> 
> Sure. What I'd prefer actually would be language integration, so that it can sort out the details of integrating runtime types into the rest of the type hierarchy, and it would be able to statically test the template. That can be done automatically (So some template parameter can't be const-folded? Okay, we'll compile it when we know what the value is!) or with subtle hints like a dynamic attribute (that, and here's the very important part, act like regular template parameters if they ARE const). But that seems unlikely as it would put a comparatively massive burden on the runtime* and make porting to new environments quite a bit more difficult. I haven't used GDC, but if it's as terrifyingly slow as GCC (at no fault of GDC I'll add) I wouldn't consider it suitable for dynamic compilation.
> 
> * In which case, hey, it's optional for restrictive environments!

I wouldn't want it transparently doing runtime code generation. I think 
the library solution, as ugly as it is, is ideal since it lets people 
know "yeah, this is a weighty operation".


More information about the Digitalmars-d-announce mailing list