comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Mize <smize@imagin.net>
Subject: Re: Question for the folks who designed Ada95
Date: 1999/04/27
Date: 1999-04-27T00:00:00+00:00	[thread overview]
Message-ID: <7g4mic$1sr0@news2.newsguy.com> (raw)
In-Reply-To: 7g4jqm$1rkg@news1.newsguy.com

Samuel Mize <smize@imagin.net> wrote:
> Corey Ashford <yeroca@rocketmail.com> wrote:
>> 
>> About modular types.
> ...
>> Why didn't Ada95 make a shift operator a first-class
>> operator on modular types.

I looked again at Matthew Heany's response, and this time noted the
second A.  For those who don't know, the AARM is the Annotated Ada
Reference Manual.

His reference, AARM B.2 (9.a), says that they didn't want to add a new
operator, and that "all predefined operations should be operators (not
functions named by identifiers)."  I'm not sure what that means, in
light of existing Intrinsic attribute functions like 'Min and 'Pred.

Besides the points in my other post, I'd note that Ada generally
assumes you're using a compiler that optimizes well, if optimization
is an issue.  So we expect the compiler to manage things like deciding
whether to shift or divide, and the programmer manage things like data
structures, algorithms and high-level programming constructs.  If you
have to hand-optimize a million-line program, you're doomed anyway.

When you *do* need to worry about it, for some small program or for a
crucial section, you can generally find an optimal way to code things.
But this isn't the first concern of the language, so the first approach
you think of won't always be the right one.

If you have to worry about line-by-line efficiency, you really have to
cuddle up to your compiler and learn a lot about it.  But that's true
for any language.  It's easier in C to convince yourself that you're
hand-optimizing something, but I've seen cases where doing so caused
SLOWER execution times, because the higher-level version was more
amenable to machine optimization.

Best,
Sam Mize

-- 
Samuel Mize -- smize@imagin.net (home email) -- Team Ada
Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam




  reply	other threads:[~1999-04-27  0:00 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-26  0:00 Question for the folks who designed Ada95 Corey Ashford
1999-04-27  0:00 ` Robert Dewar
1999-04-27  0:00   ` Tarjei Tj�stheim Jensen
1999-04-27  0:00     ` bill
1999-04-27  0:00       ` dennison
1999-04-27  0:00         ` Robert Dewar
1999-04-29  0:00           ` Robert A Duff
1999-04-27  0:00       ` Robert Dewar
1999-04-27  0:00         ` Al Christians
1999-04-27  0:00           ` Larry Kilgallen
1999-04-27  0:00             ` Al Christians
1999-04-28  0:00         ` Robert A Duff
1999-04-28  0:00           ` Robert Dewar
1999-04-29  0:00             ` Matthew Heaney
1999-04-29  0:00               ` Jean-Pierre Rosen
1999-04-29  0:00               ` Robert Dewar
1999-04-27  0:00     ` Robert Dewar
1999-04-28  0:00       ` Corey Ashford
1999-04-28  0:00         ` Robert Dewar
1999-04-28  0:00           ` Robert A Duff
1999-04-28  0:00             ` Robert Dewar
1999-04-29  0:00               ` Robert A Duff
1999-04-29  0:00           ` Corey Ashford
1999-04-29  0:00             ` Corey Ashford
1999-04-29  0:00             ` Robert Dewar
1999-04-29  0:00               ` Fraser Wilson
1999-04-29  0:00                 ` Tucker Taft
1999-04-29  0:00                 ` Mark A Biggar
1999-04-30  0:00                   ` Tucker Taft
1999-04-29  0:00                 ` Marin David Condic
1999-04-30  0:00                 ` David Brown
1999-04-29  0:00               ` Geert Bosch
1999-04-27  0:00     ` David Starner
1999-04-27  0:00       ` Robert Dewar
1999-04-27  0:00         ` David Starner
1999-04-28  0:00           ` Samuel Mize
1999-04-28  0:00           ` Robert Dewar
1999-04-28  0:00         ` Tarjei Tj�stheim Jensen
1999-04-28  0:00           ` Robert A Duff
1999-04-28  0:00           ` dennison
1999-04-28  0:00             ` Robert Dewar
1999-04-28  0:00               ` Robert A Duff
1999-04-28  0:00                 ` Brian Hanson
1999-04-28  0:00                   ` bill
1999-04-29  0:00                     ` Robert S. White
1999-04-29  0:00                       ` Robert Dewar
1999-04-30  0:00                         ` Robert S. White
1999-04-29  0:00                       ` Robert Dewar
1999-04-30  0:00                         ` Robert S. White
1999-04-30  0:00                           ` dennison
1999-04-29  0:00                     ` Robert Dewar
1999-04-28  0:00                       ` Pat Rogers
1999-04-29  0:00                         ` Robert Dewar
1999-04-29  0:00                           ` dennison
1999-04-29  0:00                             ` Pat Rogers
1999-04-30  0:00                 ` Robert Dewar
1999-04-28  0:00           ` Robert Dewar
1999-04-28  0:00             ` Robert A Duff
1999-04-29  0:00             ` Bill Ghrist
1999-04-29  0:00             ` Tarjei Tj�stheim Jensen
1999-04-28  0:00           ` Larry Kilgallen
1999-04-29  0:00           ` Question for the folks who designed Ad David Kristola
1999-04-29  0:00             ` Paul Duquennoy
1999-04-27  0:00     ` Question for the folks who designed Ada95 Larry Kilgallen
1999-04-29  0:00     ` Aidan Skinner
1999-04-30  0:00       ` Matthew Heaney
1999-04-27  0:00   ` Corey Ashford
1999-04-27  0:00 ` Samuel Mize
1999-04-27  0:00   ` Samuel Mize [this message]
1999-04-27  0:00     ` Robert Dewar
1999-04-28  0:00       ` Corey Ashford
1999-04-28  0:00         ` Robert Dewar
1999-04-29  0:00           ` Corey Ashford
1999-04-29  0:00             ` Robert Dewar
1999-04-29  0:00               ` Fraser Wilson
1999-04-29  0:00                 ` Robert Dewar
1999-04-29  0:00                 ` Marin David Condic
1999-04-28  0:00       ` Samuel Mize
1999-04-28  0:00         ` Samuel Mize
1999-04-28  0:00     ` Corey Ashford
1999-04-28  0:00     ` Corey Ashford
1999-04-27  0:00 ` Matthew Heaney
1999-04-27  0:00   ` Corey Ashford
1999-04-28  0:00     ` Marin David Condic
1999-04-28  0:00     ` Robert A Duff
1999-04-28  0:00       ` Keith Thompson
1999-04-29  0:00         ` Robert A Duff
1999-04-27  0:00   ` Matthew Heaney
replies disabled

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