"Daniel Murphy" <[email protected]> wrote in message 
news:[email protected]...
> Stealing the idea from http://d.puremagic.com/issues/show_bug.cgi?id=2698, 
> I've implemented pragma(mangle).
>
> Basically,
> pragma(mangle, "_mangled__name_")
> void myfunction() {}
>
> Will cause the compiler to use "_mangled__name_" as the function's mangle 
> string.
>
> Would many people find this a useful thing to have in the compiler?
>
> Also, does anybody know what set of characters to accept in a mangle 
> string?

It sounds like it may have great potential for working around hashed 
mangles. And maybe for exposing an API to another link-compatible language 
like C (or not, I don't know, maybe extern(C) is always good enough for 
that?).

Two possible problems I can see:

1. Can it be reliably demangled? If not, I think that would severely hinder 
its usefulness.

2. What if "myfunction" is templated?



Reply via email to