Issue 1641: Mapping of Java names that are IDL keywords (java2idl-rtf) Source: (, ) Nature: Revision Severity: Summary: Summary: The Java to IDL mapping spec says that a Java name that is an IDL keyword is mapped to a mangled name consisting of the IDL keyword followed by a trailing underscore. Now that the Objects By Value RTF has adopted escaped identifiers with keading underscores, we should revise this mapping to use escaped identifiers. I propose that section 5.2.2 of the Java to IDL mapping spec be changed to state that Java names that collide with IDL keywords are mapped to IDL by adding a leading underscore, so that typedef would be mapped to _typedef. Resolution: Revised Text: Actions taken: July 8, 1998: received issue February 23, 1999: closed issue Discussion: End of Annotations:===== Return-Path: Date: Tue, 07 Jul 1998 12:20:20 +0100 From: Simon Nash Reply-To: nash@hursley.ibm.com Organization: IBM To: java2idl-rtf@omg.org Cc: issues@omg.org Subject: Mapping of Java names that are IDL keywords The Java to IDL mapping spec says that a Java name that is an IDL keyword is mapped to a mangled name consisting of the IDL keyword followed by a trailing underscore. Now that the Objects By Value RTF has adopted escaped identifiers with keading underscores, we should revise this mapping to use escaped identifiers. For example, a Java method name oneway would currently be mapped into IDL as oneway_ and into C++ as oneway_. If we change the Java to IDL mapping to use escaped identifiers, a Java method name oneway would be mapped into IDL as _oneway and into C++ as oneway. This preserves the original Java name and improves the usability of the mapping. I propose that section 5.2.2 of the Java to IDL mapping spec be changed to state that Java names that collide with IDL keywords are mapped to IDL by adding a leading underscore, so that typedef would be mapped to _typedef. Simon -- Simon C Nash, IBM Java Technology Centre, Hursley, UK MailPoint 146, x245156 Tel. 01962 815156 or +44-1962-815156 Internet: nash@hursley.ibm.com Notes mail: Simon Nash@ibmgb Return-Path: Sender: jon@floorboard.com Date: Tue, 07 Jul 1998 21:05:51 -0700 From: Jonathan Biggar To: nash@hursley.ibm.com CC: java2idl-rtf@omg.org, issues@omg.org Subject: Re: Mapping of Java names that are IDL keywords References: <35A20474.FCB51668@mailserver.hursley.ibm.com> Simon Nash wrote: > > The Java to IDL mapping spec says that a Java name that is an IDL > keyword is mapped to a mangled name consisting of the IDL keyword > followed by a trailing underscore. Now that the Objects By Value > RTF has adopted escaped identifiers with keading underscores, we > should revise this mapping to use escaped identifiers. > > For example, a Java method name oneway would currently be mapped > into IDL as oneway_ and into C++ as oneway_. If we change the > Java to IDL mapping to use escaped identifiers, a Java method name > oneway would be mapped into IDL as _oneway and into C++ as oneway. > This preserves the original Java name and improves the usability > of the mapping. > > I propose that section 5.2.2 of the Java to IDL mapping spec be > changed to state that Java names that collide with IDL keywords > are mapped to IDL by adding a leading underscore, so that typedef > would be mapped to _typedef. Leading underscores are illegal in IDL, and the C++ mapping depends on this to define class functions that are guaranteed to not collide with IDL operation names. -- Jon Biggar Floorboard Software jon@floorboard.com jon@biggar.org