I wish I could use D for everything

Steven Schveighoffer schveiguy at yahoo.com
Fri May 1 05:28:32 PDT 2009


On Thu, 30 Apr 2009 18:46:47 -0400, Robert Fraser  
<fraserofthenight at gmail.com> wrote:

> Steven Schveighoffer wrote:
>> Yes, I use reflection in some of my code, and it definitely has to come  
>> to D sometime.  At least if I wanted to port my current project to D it  
>> would have to ;)
>
> It's in D, just not standardized. There used to be a project  
> "flectioned" by Thomas Khune that allowed reflection by either importing  
> the map file or adding debug symbols in Windows (in Linux, it worked  
> even on non-debug builds). It doesn't compile on the newer versions of  
> D, but it shouldn't be too hard to fix up.
>
> A different option would be to use some template/mixin magic to add  
> specified classes to a set of exported/reflectable types. A good example  
> of this is MiniD's binding libraries or PyD, which allow you to very  
> easily wrap a module/class/etc. and make the names visible to a dynamic  
> language.

I load executable assemblies dynamically and examine the attributes of  
classes to determine how to process them.  I don't think D is quite there,  
but I have faith it will be.

And one of the things you said is key: "used to be"...

besides, I'm using a lot of .Net APIs and it would be difficult to switch  
them to D, so I sort of am not giving you the *only* thing that would have  
to be done to port my project to D ;)

As a side note though, one of the clients that uses the server is  
completely written in D because it runs on a very small Linux OS.  It is  
actually the reason I started learning D in the first place (Didn't want  
to install C++ libs, didn't want to do network programming in C *shudder*).

-Steve



More information about the Digitalmars-d mailing list