comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Question for the folks who designed Ada95
Date: 1999/04/28
Date: 1999-04-28T00:00:00+00:00	[thread overview]
Message-ID: <wcczp3sd2s8.fsf@world.std.com> (raw)
In-Reply-To: 7g7hbe$gn5$1@nnrp1.dejanews.com

Robert Dewar <robert_dewar@my-dejanews.com> writes:

> What is missing from this discussion is an argument that
> it is advantageous to distinguish array and function
> references ... Yes, people want [] because they are
> used to it from (some) other languages, but that's a
> very weak argument.

Function calls can have side effects; array indexing does not.
It seems useful to distinguish those two.

I have also pondered the idea of having a language where function calls
with side effects have a different notation than function calls without.
Or perhaps I mean function calls with side effects or that depend on
side effects, vs pure mathematical functions.  This would require a fair
amount of additional information in the program about which functions
can read/write which variables.  Of course the rules would be
conservative, as all compile-time rules must be (unless, of course, you
can figure out how to solve the halting problem ;-)) -- I guess
memo-izing functions would have to look impure to the compiler, even
though they might be provably pure at some level of abstraction.  Ada
has pragma Pure, which is a step in the direction I'm thinking about.

You can tell I'm not in the fanatically anti-side-effect camp.  It seems
to me that *most* side effects in functions are bad, but some are fairly
harmless, and it would at least be nice to be able to tell the
difference easily when reading the code.  In fact, the ability to tell
the difference easily would make side effects *less* harmful -- the main
reason they're bad, is that they surprise you.

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  reply	other threads:[~1999-04-28  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 ` Samuel Mize
1999-04-27  0:00   ` Samuel Mize
1999-04-27  0:00     ` Robert Dewar
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         ` 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                 ` Marin David Condic
1999-04-29  0:00                 ` Robert Dewar
1999-04-28  0:00     ` Corey Ashford
1999-04-28  0:00     ` Corey Ashford
1999-04-27  0:00 ` Robert Dewar
1999-04-27  0:00   ` Corey Ashford
1999-04-27  0:00   ` Tarjei Tj�stheim Jensen
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           ` Robert Dewar
1999-04-28  0:00           ` Samuel Mize
1999-04-28  0:00         ` Tarjei Tj�stheim Jensen
1999-04-28  0:00           ` Larry Kilgallen
1999-04-28  0:00           ` dennison
1999-04-28  0:00             ` Robert Dewar
1999-04-28  0:00               ` Robert A Duff [this message]
1999-04-28  0:00                 ` Brian Hanson
1999-04-28  0:00                   ` bill
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-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-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           ` Robert A Duff
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 bill
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       ` 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-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             ` 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-29  0:00             ` Corey Ashford
1999-04-27  0:00     ` Larry Kilgallen
1999-04-29  0:00     ` Aidan Skinner
1999-04-30  0:00       ` Matthew Heaney
1999-04-27  0:00 ` Matthew Heaney
1999-04-27  0:00   ` Matthew Heaney
1999-04-27  0:00   ` Corey Ashford
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-28  0:00     ` Marin David Condic
replies disabled

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