This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Name mangling
On 01/27/2011 10:53 AM, David Chase wrote:
Have you considered John Rose's dangerous-characters mangling?
Maybe the this-that -> thisThat transformation produces a Java-friendly wrapper.
http://blogs.sun.com/jrose/entry/symbolic_freedom_in_the_vm
We do this for Fortress; you do need to be moderately careful about conventions, since sometimes you want to use dangerous characters ("$", in particular).
A problem with John Rose's mangling is that it uses '\\' as
the escape character. That obviously makes it unsuitable
for filenames and hence a poor choice for class names.
And Kawa does sometimes create mangled class names.
Using a separate mangling for classnames and everything else
seems losing, but if tools (like IDEs) start to support John's
mangling then that might be necessary.
--
--Per Bothner
per@bothner.com http://per.bothner.com/