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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Alexander E. Kopilovich" Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? Date: Mon, 17 May 2004 20:02:27 +0400 (MSD) Organization: Cuivre, Argent, Or Message-ID: References: <1mbha09eg9amttqgidkj4j4efm0e81o55d@4ax.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1084809813 6866 212.85.156.195 (17 May 2004 16:03:33 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 17 May 2004 16:03:33 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: <1mbha09eg9amttqgidkj4j4efm0e81o55d@4ax.com>; from "Dmitry A. Kazakov" at Mon, 17 May 2004 14:33:36 +0200 X-Mailer: Mail/@ [v2.44 MSDOS] X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: controlnews3.google.com comp.lang.ada:641 Date: 2004-05-17T20:02:27+04:00 Dmitry A. Kazakov wrote: > > 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. > > The difference between first-class and second-class things is that the > former cannot be expressed in other language things. Although this is a possible definition, it isn't shared by everyone. In C and then C++ worlds the difference between core language and the standard library is traditionally blurred (naturally, more for users than for compiler vendors, but the latter are affected also). I'd propose another definition, by analogy (which seems more suitable for some languages, including C/C++): a first-class citizen has Secret Clearance, while those who aren't first-class - haven't it. > Clearly it is > desirable to have a minimal set of first-class things providing a > richest possible set of second-class ones with minimal efforts. This is a language-oriented view, not an application-oriented view, and it isn't (and can't be) shared by vast majority of C/C++ users. > Thus > comparing two languages one should take into account not what the > first-class objects sets contain or not, but how productive and small > they are. That may be true/useful for pure language analysis, but the usage profile (which includes the standard library as well as the most popular non-standard libraries) is no less important for even theoretical conclusions. Alexander Kopilovich aek@vib.usr.pu.ru Saint-Petersburg Russia