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,7f2ce8bda9cae4ab X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!news.cs.univ-paris8.fr!proxad.net!freenix!grolier!foorum!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? Date: 17 May 2004 07:48:29 GMT Message-ID: <2004517-94829-360098@foorum.com> References: <13392802.3gDeTK7ybb@linux1.krischik.com> <2780491.NPbR8AFya6@linux1.krischik.com> <11924003.IfRfnULeIG@linux1.krischik.com> <1676457.GMYvKY1ieA@linux1.krischik.com> <1616198.O4tUV8TdF7@linux1.krischik.com> <87lljuvd6j.fsf@insalien.org> <874qqgpjok.fsf@insalien.org> <3tVpc.34871$vz5.29965@nwrdny01.gnilink.net> NNTP-Posting-Host: 212.190.145.10 NNTP-Posting-Date: 17 May 2004 07:48:29 GMT X-Complaints-To: abuse@foorum.fr X-POSTER: foorum.com X-Foorum_user_id: X-Foorum_user_tmp_id: 2004514-102335-705548-212.190.145.10- X-Originating-User: 212.190.145.10 X-Newsreader: Foorum Xref: controlnews3.google.com comp.lang.ada:627 Date: 2004-05-17T07:48:29+00:00 List-Id: Martin Dowie wrote: > Hyman Rosen wrote: >> But OK. You state that "The std::vector template class is not a >> first-class citizen". I haven't a clue as to what that might >> mean. All a std::vector really is in implementation is a record >> conatining a length and a couple of pointers. You can pass it and >> return it by value. It's as "first-class" as anything else in the >> language. > > I think by that, Ludovic meant that std::vector is a library as > opposed to something built into the language (e.g. int's, float's, > pointers, etc).. Yes, that is what I meant. Basically, std::vector<> does not eliminate the problems inherent to C++ arrays; it only provides a workaround. Hyman also said that a programmer who would have a std::vector* pointing to an array of vectors would be a stupid programmer. I agree, but this is another form of the oft-heard argument that "any good programmer", etc. which it is not convincing to me. -- Ludovic Brenta. -- Use our news server 'news.foorum.com' from anywhere. More details at: http://nnrpinfo.go.foorum.com/