comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator
Date: 1998/01/10
Date: 1998-01-10T00:00:00+00:00	[thread overview]
Message-ID: <dewar.884489205@merv> (raw)
In-Reply-To: 01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com


Terry asks

<<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.
>>

This is an old, old idea (the use of unary + as a reasonably un-noisy
conversion operator). Jean Ichbiah was always a fan of this idea, which
I think was firmly in mind at the time of the original Ada design.

During the Ada95 revision, Jean suggested (and I supported) the idea
of a new unary operator (the currency conversion character, a small
square with inward curved sides is a nice choice) that would be undefined,
but available for user definition, with the specific idea that it be
used for this kind of conversion operator. However, the idea did not
catch many other people's imagination so it died.

Terry suggests using the "-" for the conversion in the other direction,
but I think that is a mistake. The use of "+" is reasonable because this
is a seldom used operator, since it has sort of "null" semantics, which
in a sense is just right for conversion. The negation operator has much
stronger semantics in typical use.

Also in a typical situation there is no real reason to think of conversion
in one direction being in any way non-symmetrical with conversion in the
other direction. The normal technique (for those who like the unary plus
technique, be aware that there are some people who *really* dislike this
usage) is to simply use "+" for both directions. The overloading resolution
figures out which one you are talking about.

Robert Dewar





  reply	other threads:[~1998-01-10  0:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-11  0:00 renaming Interfaces.Java.Ada_To_Java_String to the + operator Terry J. Westley
1998-01-10  0:00 ` Robert Dewar [this message]
1998-01-10  0:00   ` Matthew Heaney
1998-01-13  0:00     ` Tom Moran
1998-01-13  0:00       ` Robert Dewar
1998-01-13  0:00       ` Stephen Leake
1998-01-13  0:00       ` Stephen Leake
1998-01-13  0:00         ` Nick Roberts
     [not found]       ` <En3Cxz.7HD@world.std.com>
1998-01-20  0:00         ` Robert Dewar
1998-01-21  0:00           ` Stephen Leake
1998-01-22  0:00           ` Robert Dewar
1998-01-22  0:00             ` Anonymous
     [not found]               ` <dewar.885498969@merv>
1998-01-23  0:00                 ` Geert Bosch
1998-01-23  0:00                 ` Tom Moran
1998-01-23  0:00             ` Anonymous
1998-01-24  0:00             ` Tucker Taft
1998-01-11  0:00   ` Chris Morgan
1998-01-11  0:00     ` Robert Dewar
1998-01-11  0:00       ` Chris Morgan
1998-01-11  0:00         ` Robert Dewar
1998-01-11  0:00           ` Chris Morgan
1998-01-11  0:00             ` Robert Dewar
1998-01-11  0:00 ` Nick Roberts
1998-01-11  0:00   ` Brian Rogoff
1998-01-13  0:00     ` Terry J. Westley
1998-01-14  0:00       ` Robert Dewar
1998-01-15  0:00         ` Nick Roberts
1998-01-15  0:00           ` Robert Dewar
1998-01-16  0:00           ` Michael F Brenner
1998-01-16  0:00             ` Nick Roberts
1998-01-16  0:00               ` Robert Dewar
1998-01-17  0:00                 ` miniscences Nick Roberts
1998-01-17  0:00                   ` miniscences Robert Dewar
1998-01-19  0:00                 ` renaming Interfaces.Java.Ada_To_Java_String to the + operator Anonymous
1998-01-25  0:00                   ` Matthew Heaney
1998-01-16  0:00             ` Robert Dewar
1998-01-11  0:00   ` Robert Dewar
1998-01-14  0:00     ` Anonymous
1998-01-14  0:00       ` Robert Dewar
1998-01-12  0:00 ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox