comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator
Date: 1998/01/11
Date: 1998-01-11T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.3.96.980111141329.4941A-100000@shell5.ba.best.com> (raw)
In-Reply-To: 01bd1ebc$3bb2cb20$20f382c1@xhv46.dial.pipex.com


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






  reply	other threads:[~1998-01-11  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
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 [this message]
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