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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7ee10ec601726fbf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-31 07:48:42 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: why not Date: Wed, 31 Oct 2001 10:51:51 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3BC5D730.DA950CC7@boeing.com> <9q4pa7$1ad$1@nh.pace.co.uk> <3BC6ACC8.23EF21BC@free.fr> <3BC71F54.1FFE78FA@boeing.com> <1KGx7.26476$ev2.35117@www.newsranger.com> <3BC7AD82.2A0CCCD4@acm.org> <9qhiqr$af0$1@nh.pace.co.uk> <1nDC7.180$6S7.92255364@newssvr11.news.prodigy.com> <9rjsak$bp3$1@nh.pace.co.uk> <9rmhb9$o1b$1@nh.pace.co.uk> <3BDEF0FE.B55FED9E@san.rr.com> <9rmuqi$es$1@nh.pace.co.uk> <3BDF1F13.4B99361C@san.rr.com> <9rnbtv$5i4$1@nh.pace.co.uk> <3BDF8C59.5020108@mail.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:15482 Date: 2001-10-31T10:51:51-05:00 List-Id: "David Botton" wrote in message news:tu014vtnua0j60@corp.supernews.com... > For that reason something like STL (which I am a heavy user of for many > years) which in its very design is prone to buggy implementations, difficult > to maintain and easily misused by programmers will likely never be > standardized as part of Ada. Ada needs as part of its standard library a minimal set of data structures. It doesn't have to be as elaborate as the STL. At a minimum something like an STL list, parameterized with an item type that is nonlimited and definite. I wouldn't even miss the algorithm part of the STL -- but we do need the data structures. I agree with David that there is a culture difference between Ada and C++. For example, in C++ I can do this: void f() { typedef std::list intlist_t; intlist_t::iterator iter; { intlist_t intlist; intlist.push_front(0); ... iter = intlist.begin(); } int i = *iter; //ouch! } Among C++ programmers, you would probably just be told "don't do this" (which is OK by me -- I happen to like the STL). But in the Ada culture we would try to design a component such that this scenario couldn't happen (or at least have a run-time error of some kind). So it's not clear that components exactly like the STL would ever be adopted by the standards commitee. An Ada STL would probably look something like this: procedure Op is List : aliased Integer_Lists.List_Type; begin ... declare Iter : Integer_Lists.Iterator_Type (List'Access); begin ... end; ... end Op;