demangle and mangleof

Bradley Smith digitalmars-com at baysmith.com
Fri Jun 9 01:11:23 PDT 2006


Does it seem reasonable that the demangle() function should work for the 
.mangleof property?


private import std.stdio;
private import std.demangle;

void main() {
	class A {
	}
	writefln(A.mangleof);
	writefln(demangle(A.mangleof));
}

This code prints

C_Dmain1A
C_Dmain1A

It would be nice if it printed

C_Dmain1A
class main.A


Does the D language even have the concept of a fully qualified class 
name? The property .classinfo.name is just the simple name of a class.

The AssertError also just prints the simple file name rather than the 
source file path. This makes the error less useful when having modules 
with the same name in different packages.

Thanks,
   Bradley



More information about the Digitalmars-d-learn mailing list