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!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!irazu.switch.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada exception block does NOT work? Date: Thu, 18 Aug 2005 19:54:08 +0200 Organization: Cablecom Newsserver Message-ID: <2968559.4nqHLmE7KN@linux1.krischik.com> References: <4301ab29$0$6989$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Host: 84-72-114-216.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1124466318 7559 84.72.114.216 (19 Aug 2005 15:45:18 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Fri, 19 Aug 2005 15:45:18 +0000 (UTC) User-Agent: KNode/0.9.2 Xref: g2news1.google.com comp.lang.ada:4192 Date: 2005-08-18T19:54:08+02:00 List-Id: Maciej Sobczak wrote: > Note that those other languages can throw regular objects as exceptions, > thus enabling polymorphism when they are handled. It is interesting to note that Java and C# has reversed from C++ not allowing any object to be thrown - but only object which are "Throwable". Besides: can you throw C++/Java/C# exception across Threads, Processes or Distributed (from on computer to the next over a network). You can with Ada. > One could say that > this is the point of good integration and that Ada's exceptions are a > conceptual patch that did not integrate with the rest of the object > model, leading to two separate spaces of language entities instead of > only one. Well Ada 83 had exceptions but not objects with dispatching so exceptions could not be objects. In fact this is one point you should remember: Ada 83 hat exceptions, generics, well defined type system with type extension for primitive (int, emum, etc. pp) types and a concept for "private". The only thing which was missing and was added with Ada 95 where objects as a C++ would see then. C++ programmers often see Ada object as something bolted on - and I too had some problems - but once you understand how it works you will see that it is far better integrated into the language then in C++. Surprised? Well Ada 95 had a concept of "RTTI" right from the beginning - in C++ RTTI was bolted on later. And because Ada had "RTTI" right from the beginning Ada does not need those "clone ()" functions often suggested in C++ and Java tutorials. In Ada can clone any object without the aid of clone () or Clonable. How it works? Read: http://en.wikibooks.org/wiki/Ada_Programming/Subtypes#Indefinite_subtype http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#The_class-wide_type Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com