On 09/26/2015 01:26 PM, John Rose wrote:
On Sep 25, 2015, at 11:13 AM, Per Bothner <p...@bothner.com 
<mailto:p...@bothner.com>> wrote:

Finally, Java reserved word cause a problem: Should we mangle
the identifier 'package' just because it is a reserved word in Java?

For Project Panama we have been making a distinction between
"source name" (a Kawa identifier in this case) and "carrier name"
(a name subject to other formation rules, therefore needing mangling).

If your carrier namespace is JVM identifiers, there's no need to transform
the source names "package", "int", etc.  If your carrier namespace is
Java identifiers, you need much more mangling, probably using hex
numerals at some points, and you need to mangle keywords
like "package" also.  "Symbolic freedom" won't help much with
Java language interop.

I don't see a reason to mangle the Kawa source name "package"
using the "symbolic freedom" system, since that system is only
for the carrier names that are JVM identifiers.  But if you wanted
to tweak it anyway, you could consider adding the null prefix "\=".

I have never mangled "package" and I don't intend to.  I've already
decided to give up on mangling to "almost-always-Java-safe" names
("almost always" because "package" isn't Java-safe, for example),
in favor JVM-safe names that are more readable.  What I'm deciding
between is either (1) loosening up of the existing Kawa mangling
(mangling fewer characters, but don't change the current encoding
for those characters that remain mangled), or (2) implementing the
"symbolic freedom" system.  Hence my question about which
languages and tools use/support the latter.
--
        --Per Bothner
p...@bothner.com   http://per.bothner.com/

--
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jvm-languages+unsubscr...@googlegroups.com.
To post to this group, send email to jvm-languages@googlegroups.com.
Visit this group at http://groups.google.com/group/jvm-languages.
For more options, visit https://groups.google.com/d/optout.

Reply via email to