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,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: Tue, 31 Aug 2004 11:57:12 +0200 Organization: cbb-software GmbH Message-ID: <11yezshhmmymc$.1l2njjc132k9n$.dlg@40tude.net> References: <49dc98cf.0408110556.18ae7df@posting.google.com> <1198227.gWQ0keDDOY@linux1.krischik.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de B0Omv05QEqUdYOk7XVQpEwRStQmki2Yn+vZciIRjn3D4Tbtik= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:3203 Date: 2004-08-31T11:57:12+02:00 List-Id: On 31 Aug 2004 00:25:27 -0700, Kevin Cline wrote: > This is true. Classes stored in STL containers need not be > default-constructible, but they must be assignable and copyable. Consider this: procedure Foo (Object : Thing'Class) is Copy : Thing'Class := Object; -- Assignment "dispatches" in Ada! begin ... I should admit that I do not know how to do it in C++. Probably it is fundamentally impossible. [ Background: once I designed a kind of rendezvous for C++. I was stunned by the problem of exception handling. One catches an exception in one thread and then re-raises it in another. Well, all exceptions have to be derived from the same base. But you cannot copy a class-wide object in C++! (throw is like return) ] > I seem to have confused limited types and controlled types, probably > because I stopped programming in Ada before there were controlled > types. Still, using controlled types also seems to be problematical. Much as classes in C++, controlled types in Ada are a hack designed to not disturb the rest language. It quickly achieves its goal, to make OO programming possible, but in a long term perspective a more consequent solution is needed. IMO the program for Ada 2010 should be: 1. all specific types have T'Class-classes 2. all types have constructors/destructors 3. all attributes are primitive operations 4. all built-in operations are primitive 5. all predefined classes (array, record, access etc) are T'Class-classes 6. multiple inheritance 7. multiple dispatch -- Regards, Dmitry Kazakov www.dmitry-kazakov.de