This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Name mangling
We deal with this issue by stuffing everything in jar files. We get file names that look like this:
EqualityBug2â$=âââ$\=âArrowâEqualityBug2\%EqualityâSelfâ\?Self\?com\|sun\|fortress\|compiler\|runtimeValues\|FBooleanâ.class
(No promise on whether it comes through ok, there's Unicode in there. And we're still working on our first compiler, hence the horrible spelling for "boolean")
David
On 2011-01-27, at 2:25 PM, Per Bothner wrote:
> 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/