From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ee1a8b8db84c88f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada exception block does NOT work? Date: 20 Aug 2005 17:34:51 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4301ab29$0$6989$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1124573691 6493 192.74.137.71 (20 Aug 2005 21:34:51 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 20 Aug 2005 21:34:51 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4222 Date: 2005-08-20T17:34:51-04:00 List-Id: "Jeffrey R. Carter" 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