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/11
Date: 1998-01-11T00:00:00+00:00	[thread overview]
Message-ID: <dewar.884563559@merv> (raw)
In-Reply-To: 87u3bah4k1.fsf@ix.netcom.com


Chris said

<<I think all those would be fine. I was just saying it was nice that
someone had offered something to allow an approximation of the varargs
C functions rather than the previous approach of saying "sorry, Ada
doesn't do varargs so you will have to use the non-varargs versions
instead" which wouldn't have fitted in with my accustomed style of
Motif programming.
>>

Well I am surprised that anyone would have taken this "previous" approach.
Certainly the possibility of using array aggregates in this way is the
reason that you don't need varargs type support in a language like Ada
(this is not a new idea, this usage is completely familiar from Algol-68).

So this is not some kind of "neat discovered trick" in the language, it is
an important part of the intended design!

Regarding the quadratic behavior, and your mention of efficiency in Ada 83,
in fact if you think about

   a & b & c & d

the natural implementation will definitely be quadratic, since this really
means

  ((a & b) & c) & d)

and in the general case, e.g. with user defined concatenation, must be
done in three separate operations. A compiler can specially recognize
this case, but it is not a trivial optimization (I just put it into GNAT,
and it took a full day of work to get it right).






  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                 ` Tom Moran
1998-01-23  0:00                 ` Geert Bosch
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 [this message]
1998-01-11  0:00 ` Nick Roberts
1998-01-11  0:00   ` Robert Dewar
1998-01-14  0:00     ` Anonymous
1998-01-14  0:00       ` Robert Dewar
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             ` Robert Dewar
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-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