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 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator Date: 1998/01/11 Message-ID: #1/1 X-Deja-AN: 315077558 References: <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com> <01bd1ebc$3bb2cb20$20f382c1@xhv46.dial.pipex.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 884558025 16033 bpr 206.184.139.132 Newsgroups: comp.lang.ada Date: 1998-01-11T00:00:00+00:00 List-Id: On 11 Jan 1998, Nick Roberts wrote: > 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). Would your discomfort be less if Ada allowed user defined unary and infix operators, so that some new notation could be invented? Or is it the use of *any* unary operator rather than a named conversion function distasteful? Personally, I rather like the "+" as a converter notation; I saw it early in my Ada education and thought it was a fairly standard idiom. As was pointed out elsewhere it can be used bidirectionally because of Ada's overloading. > Given that the only reason (tell me if I'm wrong) is to abbreviate an > identifier, essentially, I feel it is rarely justifiable. Why? I thought the goal was readability. Sometimes compact code is more readable. > 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. Well, when I was doing a lot of numerical linear algebra and signal processing work, I really wished that I could invent my own unary and infix operators rather than being forced to use function call syntax for everything. While I'm sure that someone could use that to write really ugly code, there are situations where that notation (obscure to an outsider) could have made code much nicer. -- Brian