www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Article first draft: The Joy and Gibbering Terror of Custom-Loading

Robert Fraser Wrote:

 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, 

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".

D has absolutely no presence in limited-memory environments and I don't see that ever happening, not just because of its design but because those environments are dying out (micro-limited-memory environments are here to say). Maybe someone with a 2 GHz processor and a gigabyte of RAM wants to control every single byte, but their concern is invalid. Where they should be enjoying their riches they're sitting there biting their nails over nothing like a rich man obsessed with thieves, while Java and C# gladly take a few dozen megabytes for simple programs. Even if I did think it worth courting them it would be pointless; D has garbage collection and that's the end of the story.
Feb 16 2008