From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, LOTS_OF_MONEY,RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d6ef988ec3a5ef7 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator Date: 1998/01/11 Message-ID: <01bd1ebc$3bb2cb20$20f382c1@xhv46.dial.pipex.com>#1/1 X-Deja-AN: 314987124 Content-Transfer-Encoding: 7bit References: <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Organization: UUNet UK server (post doesn't reflect views of UUNet UK) Newsgroups: comp.lang.ada Date: 1998-01-11T00:00:00+00:00 List-Id: I dislike this usage, in commercial programming situations, usually. The reason is well known: that it can often be confusing (or, at least, less obvious) for programmers new to the library environment or project. I think it's fair to say, also, that this sort of notation can be so 'quiet' as to be overlooked, and thus a source of mistakes (which would have been avoided with a 'louder' notation). Given that the only reason (tell me if I'm wrong) is to abbreviate an identifier, essentially, I feel it is rarely justifiable. If the programmer feels that an identifier is too long ("Ada_To_Java_String" perhaps), it can always be renamed (or subtyped or whatever) to a shorter, but still meaningful, identifier ("A2Jstr" possibly). One of the real practical strengths of Ada is its lack of obscure notation. I'm a real fan (as you can tell :-) of this clarity. -- Nick Roberts Croydon, UK Proprietor, ThoughtWing Software; Independent Software Development Consultant * Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 * *** Eats three shredded spams every morning for breakfast *** Terry J. Westley wrote in article <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com>... > Does anyone know who's idea it was to rename the > Interfaces.Java.Ada_To_Java_String function to the "+" > operator in the Intermetrics Java bindings? I'm > using the Aonix ObjectAda translator but assume that > the Java class library came from Intermetrics. > > Thanks much for this clever little idea. IMHO, it > really improves ease of use and code readability. > > Does this idea originate with the Java work at > Intermetrics or does it predate it? > > I find the inverse of + useful as well: > > function "-" (s : String_Ptr) return String > renames Interfaces.Java.Java_To_Ada_String; > > Does anyone think this is a misuse of operator > overloading? > > -- > Terry J. Westley, Principal Engineer > Calspan SRL Corp, P.O. Box 400, Buffalo, NY 14225 > westley@calspan.com http://www.calspan.com/