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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d6ef988ec3a5ef7,start X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator Date: 1998/01/10 Message-ID: #1/1 X-Deja-AN: 314840620 References: <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 884489540 16065 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-01-10T00:00:00+00:00 List-Id: Terry asks <> 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