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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews2.google.com!not-for-mail From: kevin.cline@gmail.com (Kevin Cline) Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: 31 Aug 2004 00:25:27 -0700 Organization: http://groups.google.com Message-ID: References: <49dc98cf.0408110556.18ae7df@posting.google.com> <1198227.gWQ0keDDOY@linux1.krischik.com> NNTP-Posting-Host: 24.1.141.253 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1093937128 17042 127.0.0.1 (31 Aug 2004 07:25:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 31 Aug 2004 07:25:28 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:3196 Date: 2004-08-31T00:25:27-07:00 List-Id: Martin Krischik wrote in message news:<1198227.gWQ0keDDOY@linux1.krischik.com>... > Kevin Cline wrote: > > > Georg Bauhaus wrote in message > > news:... > > > Charles is a pale imitation of the C++ STL. It defines containers, > > but provides no generic algorithms. My Ada is now a bit rusty, but it > > also appears that Charles containers can not be used with limited > > types. > > But C++ containers don't support limited types as well. If you define: > > class T > { > private: > > operator = (T const& value); > } > > then you can't have: > > vector ; This is true. Classes stored in STL containers need not be default-constructible, but they must be assignable and copyable. 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. For example, I found this at http://www.gidenstam.org/Ada/: "In Ada controlled types, i.e. types with user defined initialize and finalize operations, must be declared at the library level - either as direct descendents of Ada.Finalization./Limited_/Controlled or via a mixin component that inherits from Ada.Finalization./Limited_/Controlled. This makes it a bit of a hassel to use controlled types, and in particular it makes it quite limiting to use controlled types in generic packages that one otherwise would have liked to instansiate at other levels than the library level. This library, the Add Finalization Anywhere Library, provides a nice(?) way to add finalization to any (limited) tagged type at any level. The structure of the library is inspired by Christoph Karl Walter Grein's library for adding finalization to library level tagged types and my library is designed to integrate well with his. However, since declaring controlled types elsewhere than at the library level isn't supported by Ada there is a lot of hackish things going on inside the library. Currently, I don't know whether the these things work on any other compiler than GNAT 3.13p and whether they are at all sane." I don't know about you, but that mades my head hurt. In C++ there are some things that make my head hurt too, but they mostly are there to determine the meaning of code that I would naver write in the first place.