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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? Date: Tue, 18 May 2004 08:27:39 +0200 Organization: AdaCL Message-ID: <2224579.OFejJaQjOJ@linux1.krischik.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> <21700814.aMYQM4SCxr@linux1.krischik.com> <86d652ygvm.fsf@lns-th2-14-82-64-63-6.adsl.proxad.net> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1084861986 07 10750 pLG8G0D6KzDF6BR 040518 06:33:06 X-Complaints-To: usenet-abuse@t-online.de X-ID: SXzkF4ZcoeoI1A0iIjHlWnMeSGkWBmgbT3TYgefqjUqJV6SAACAT0d User-Agent: KNode/0.7.7 Xref: controlnews3.google.com comp.lang.ada:658 Date: 2004-05-18T08:27:39+02:00 List-Id: James Kanze wrote: > Martin Krischik writes: > > So bool and complex are not first class in C, because you need to "turn > them on"? I'm afraid I don't really understand this distinction. (The > way most C++ intantiations implement this is extremely primitive. But > there's nothing second class about it, in the context of the language.) Well ISO 9899:1999(6.2.5) declares both _Bool and _Complex as keywords and therefore first class. bool and complex on the other hand are macros and do not feature in the language at all. > |> vector <> is not a first class citizen because you need "#include > |> " > > And on many of the early C implementations I'used, float wasn't first > class, because you needed to link in a special library to get it? float is a keyword. So float is first class. Neither the Ada ISO standart nor the C/C++ ISO standart define how linking is done. So if you compiler vendor thinks that the float library need to be linked separately is not the fault of the language. > More precisely: First class is what you like, and second class is > everything else. OK, you win. Lets try an other definition: First class are the atomic feature of an language. Those which can not be broken down further. > |> The argument is that everything inside a language need to be > |> implemented with first class citizen - they are the fondatation of > |> everything else and design errors in this area have profound > |> consequences. > And one of the basic premises of Stroustrup is that there should be as > little in the language as possible. I don't necessarily agree with this > attitude; some things, like closure, can really only be done effectively > from within the language. But just saying it is bad, or second class, > doesn't prove anything. I do like second class features as well. In fact I also spend a lot of time creating those second class features so I like well defined building blocks to do that. > |> 1) #include instead of an proper import/with. > |> 2) implicit type convertion. > |> 3) arrays are pointers. > Arrays aren't pointers. There's just another implicit type conversion. You are right. But a particular nasty case of implicit type conversion which deserves to be named separately - you loose the size of the object which leads to nice things like Blaster32. Blaster32 was a nice supprice when I came out of holiday last year. Without Linux I would not able to keep the computer running long enough to download the patch. > And you don't mention the declaration syntax, which is enough to drive > any sane man up the wall. Ah, yes good point. Hint: try to use the "auto" keyword for better readability. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com