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,55f6e230b02eff2f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news2.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: Containers - nontrivial element access Date: Thu, 11 Oct 2007 15:15:22 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1191275759.184463.238350@n39g2000hsh.googlegroups.com> <1191343440.985588.143470@d55g2000hsg.googlegroups.com> <1191440425.737861.140360@50g2000hsm.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1192130122 15883 192.74.137.71 (11 Oct 2007 19:15:22 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 11 Oct 2007 19:15:22 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:+7IKNh6CpO/XP1Fk9PBA1TigBzw= Xref: g2news2.google.com comp.lang.ada:2432 Date: 2007-10-11T15:15:22-04:00 List-Id: Jacob Sparre Andersen writes: > Robert A Duff wrote: > >> In Ada, "array" is built in, and has all kinds of cool features >> (aggregates, with full-coverage checking, for example). It's >> annoying that vectors can't have all of those features. > > What is the reason that vectors (and trees and linked lists) aren't > built in, while arrays are? Building things in tends to make a language much more complicated. I'd say too many things are built in to Ada already. Also, there is an open-ended list of things like vectors. It's impossible to build them ALL in, since there are too many (and they have not all been invented yet!). Ideally, if Ada.Containers.Vectors did not exist, any programmer should be able to create it (and make it have all the cool features of arrays). - Bob