Just one more thing...

Sean Kelly sean at invisibleduck.org
Sun Mar 1 15:32:19 PST 2009


Daniel Keep wrote:
> 
> Sean Kelly wrote:
>>> One somewhat weird issue that we may have to face at some point is that
>> Posix functions whose behavior was changed have had the symbol for the
>> new function changed to _blah$UNIX2003, with the old function left in
>> place.  Since D can't declare symbols like this, we may end up having to
>> add shims in C or post-process object files if it turns out that the old
>> implementation of a function isn't sufficient.  I'd love to hear of a
>> better solution here.
> 
> extern(C) void __identifier("blah$UNIX2003")(int);

That would be awesome.

> A beneficial side-effect is that I can finally get rid of all those
> mixins that are just doing this:
> 
> mixin(`void `~name_of_fn~`(int a)
> {
>     // ... rest of function ...
> }`);

I had absolutely no idea that this could be used to generate symbol 
names that are illegal in D.


More information about the Digitalmars-d-announce mailing list