Re: Ada exception block does NOT work?
- From: Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx>
- Date: 20 Aug 2005 17:34:51 -0400
"Jeffrey R. Carter" <spam@xxxxxxxx> writes:
> Robert A Duff wrote:
>
> > Ada was certainly not the first language with exceptions.
> > Does anybody know which one was? And were they called "exceptions"
> > and were they "raised" and "handled"?
>
> Perhaps I should have added a smiley in there.
;-)
>... But between Ada and those
> using the C++ notation, Ada was certainly first.
Indeed. I do prefer "raise/handle" to "throw/catch", but maybe because
that's what I'm used to.
There are also exceptions in the hardware world, variously called
"exceptions", "traps", and "synchronous interrupts". I'm talking about
divide-by-zero, overflow, and the like. Surely the software concept
came from that?
> > Besides, there's an element of "pot calling kettle black" here.
> > Ada misuses quite a few terms. For example, pointers should be called
> > "pointers" or "references", not "accesses". And it's an abomination to
> > use the term "integer" for a meager subset of the integers. I believe
> > the term "integer" to refer to the infinite set predates Ada somewhat.
>
> I always thought the whole point of "access" was to not (seem to)
> require them to just be "pointers". Bounds information and the like can
> be part of an access value.
Perhaps also to distinguish them from C-style pointers, which are rather
lower level.
To me, "pointer" does not imply "a single machine address".
To me, "pointer" means something that can point at things,
and that includes fat pointers, pointers containing array
dope, pointers represented as offsets instead of addresses,
double indirections, &c.
To me, "pointer" and "reference" are synonymous.
And "address" or "machine address" can be used for the hardware-level
concept.
An index into an array can be used as a pointer to a particular
array element.
Ada evolved from Pascal, and Pascal called them pointers.
In Pascal, there was no requirement or implication that
they must be a single machine address. There is no need
for array dope in Pascal, but adding array dope doesn't seem
like it requires renaming the whole concept.
> As for Integer, you're quite right, but it's also quite natural to use
> that name (or a shortened form of it) for such a subset. Such a usage is
> quite common in computer languages; see FORTRAN (1955?) for an
> example. What would be a better name for such a type?
I'd use "Integer" for what Lisp calls "bignums" -- integers that can
grow without bound (except of course you can run out of memory,
but that's true of Strings and whatnot, too. I'd call the integer type
that is based on the hardware (e.g. 32-bit integers) "Machine_Integer".
And I wouldn't put it in a package called "Standard" and I wouldn't
make it automatically visible everywhere.
I think one ought to be allowed to say:
type T is range 1..10**100;
Portably.
- Bob
.
- Follow-Ups:
- Re: Ada exception block does NOT work?
- From: Martin Krischik
- Re: Ada exception block does NOT work?
- From: Dmitry A. Kazakov
- Re: Ada exception block does NOT work?
- From: Björn Persson
- Re: Ada exception block does NOT work?
- From: Frank J. Lhota
- Re: Ada exception block does NOT work?
- References:
- Ada exception block does NOT work?
- From: bubble
- Re: Ada exception block does NOT work?
- From: Georg Bauhaus
- Re: Ada exception block does NOT work?
- From: bubble
- Re: Ada exception block does NOT work?
- From: Jeffrey R. Carter
- Re: Ada exception block does NOT work?
- From: Maciej Sobczak
- Re: Ada exception block does NOT work?
- From: Jeffrey R. Carter
- Re: Ada exception block does NOT work?
- From: Maciej Sobczak
- Re: Ada exception block does NOT work?
- From: Robert A Duff
- Re: Ada exception block does NOT work?
- From: Jeffrey R. Carter
- Re: Ada exception block does NOT work?
- From: Robert A Duff
- Re: Ada exception block does NOT work?
- From: Jeffrey R. Carter
- Ada exception block does NOT work?
- Prev by Date: Re: [OT] TEST
- Next by Date: Re: [OT] Way out in Left field
- Previous by thread: Re: Ada exception block does NOT work?
- Next by thread: Re: Ada exception block does NOT work?
- Index(es):
Relevant Pages
|