comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Dowie <martin@dowie-cs.demon.co.uk>
Subject: Re: Future Ada language revisions?
Date: 1998/10/05
Date: 1998-10-05T00:00:00+00:00	[thread overview]
Message-ID: <KxPqMDAonPG2EwCX@dowie-cs.demon.co.uk> (raw)
In-Reply-To: Pine.BSF.4.02A.9810042210470.18465-100000@shell5.ba.best.com

In article <Pine.BSF.4.02A.9810042210470.18465-100000@shell5.ba.best.com
>, Brian Rogoff <bpr@shell5.ba.best.com> writes
>Since some of us don't have superfast connections, a suggestion to look on
>the Deja News archives without some more info is rather unhelpful. A naive 
>search on obvious keywords turns up too much to scan.

i've had a look through DN to see if this one has been done to death
before but i can't find anything on it - if you know different please e-
mail me!

my suggestion concerns subprogram specs. as defined in Ada83 (i'm still
reading up on Ada95, but i haven't seen anything to suggest this
extension has been made) the contract made between the provider and user
is clearly defined when things are going well, but when exceptions are
raised, its up to the mercy of the provider to add appropriate
documentation (be it user manual, code comment, whatever) to allow the
user to see what to expect.

Would it be feasible to extend the specification for subprograms to
include a list of exceptions that can also be 'returned' from a
subprogram? here's an example using of what i'm driving at (hopefully
it's self explanatory) -

  function Blah return Boolean
    or exception Some_Exception;

and for multiple exceptions, something like -

  function Blah return Boolean
    or exception Some_Exception, Another_Exception;

the syntax i have used here also reuses existing reserved keywords, so
no language extension necessary there.

This would not only help the user of the subprogram but perhaps could be
used by compilers/linkers to generate warnings (errors?) for unhandled
exceptions or even when the body is provided if it can't/doesn't
actually raise the error declared.

Are there compiler problems with this, or fundamental language problems?
over to the language lawyers!
-- 
Martin Dowie




  reply	other threads:[~1998-10-05  0:00 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-27  0:00 Future Ada language revisions? bpr5549
1998-09-27  0:00 ` Larry Kilgallen
1998-09-27  0:00   ` Brian Rogoff
1998-09-28  0:00     ` Michael F Brenner
1998-09-28  0:00       ` dewarr
1998-09-28  0:00     ` dewarr
1998-09-28  0:00       ` Brian Rogoff
1998-09-29  0:00         ` Michael F Brenner
1998-10-02  0:00           ` Fergus Henderson
1998-09-29  0:00         ` Larry Kilgallen
1998-09-28  0:00   ` Arthur Evans Jr
1998-09-28  0:00     ` dewarr
1998-09-28  0:00 ` dewar
1998-10-05  0:00   ` Alfred Hilscher
1998-10-05  0:00     ` Tucker Taft
1998-10-05  0:00     ` Brian Rogoff
1998-10-05  0:00       ` dewarr
1998-10-05  0:00     ` dewarr
1998-10-06  0:00       ` Alfred Hilscher
1998-10-02  0:00 ` Robert I. Eachus
1998-10-03  0:00   ` Brian Rogoff
1998-10-05  0:00     ` dewarr
1998-10-04  0:00       ` Brian Rogoff
1998-10-05  0:00         ` Martin Dowie [this message]
1998-10-05  0:00           ` Niklas Holsti
1998-10-05  0:00             ` Martin Dowie
1998-10-05  0:00           ` dewarr
1998-10-06  0:00           ` r_barton1
1998-10-06  0:00           ` dennison
1998-10-06  0:00           ` dennison
1998-10-06  0:00             ` dewarr
1998-10-06  0:00               ` Martin Dowie
1998-10-06  0:00             ` Martin Dowie
1998-10-06  0:00         ` Matthew Heaney
1998-10-06  0:00     ` Robert I. Eachus
1998-10-06  0:00       ` Brian Rogoff
1998-10-07  0:00       ` dewarr
     [not found] ` <tgmF02yDo.A84@netcom.com>
1998-10-06  0:00   ` Matthew Heaney
1998-10-08  0:00 ` dennison
1998-10-08  0:00   ` Brian Rogoff
1998-10-09  0:00     ` dennison
1998-10-08  0:00   ` Pat Rogers
1998-10-16  0:00   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1998-10-21  0:00 Van Snyder
1998-10-22  0:00 ` Robert A Duff
1998-10-21  0:00   ` Brian Rogoff
1998-10-23  0:00     ` Robert I. Eachus
1998-10-29  0:00     ` Robert A Duff
1998-10-30  0:00       ` Brian Rogoff
replies disabled

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