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!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!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: 18 Aug 2005 17:15:05 -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 1124399705 25398 192.74.137.71 (18 Aug 2005 21:15:05 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 18 Aug 2005 21:15:05 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4175 Date: 2005-08-18T17:15:05-04:00 List-Id: Maciej Sobczak writes: > Jeffrey R. Carter wrote: > > > Ada has had exceptions, well integrated with the rest of the language, > > since Ada 80. Ada's terminology is that exceptions are raised and > > handled. > > OK, but the question is not about terminology, really. By the way, here's a more subtle terminology difference: What Ada calls "an exception" is what some other languages call "an exception type" or "an exception class". What Ada calls "an exception occurrence" is what other languages call "an exception" (i.e. "an object of an exception type/class"). And by the by the way, here's an analogy: In very-early versions of Ada (the Green language), tasks were a separate gizmo. The designers of Ada 83 wisely chose to make tasks be more integrated with the rest of the language -- to create a task, you declare an object of a task type, or create a heap object of a task type using "new", just like other sorts of objects are created. In Green, there was something called a "task family", indexed by integers. In Ada, you simply create an array of tasks. This is both simpler (no need for a separate "task family" concept) and more general (you can create any other sort of data structure using tasks -- arrays of pointers to variant records containing tasks, etc). I wish exceptions were treated the same way, with first-class exception types and exception objects. This would be both simpler and more general. - Bob P.S. Regarding tasks, they didn't go quite far enough. For example, why do we say "task type T is..." instead of "type T is task..." like all the other kinds of types?