comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: "Must instantiate controlled types at library level." Why?
Date: Tue, 18 May 2004 08:27:39 +0200
Date: 2004-05-18T08:27:39+02:00	[thread overview]
Message-ID: <2224579.OFejJaQjOJ@linux1.krischik.com> (raw)
In-Reply-To: 86d652ygvm.fsf@lns-th2-14-82-64-63-6.adsl.proxad.net

James Kanze wrote:

> Martin Krischik <krischik@users.sourceforge.net> 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
> |>  <vector>"
> 
> 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




  reply	other threads:[~2004-05-18  6:27 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 23:04 "Must instantiate controlled types at library level." Why? Peter C. Chapin
2004-05-12  1:03 ` Jeffrey Carter
2004-05-12 10:47   ` Peter C. Chapin
2004-05-12 11:25     ` Ludovic Brenta
2004-05-12 14:41       ` Martin Krischik
2004-05-13  2:20       ` Peter C. Chapin
2004-05-12 11:55     ` Martin Krischik
2004-05-13  2:59       ` Peter C. Chapin
2004-05-13  7:10         ` Martin Krischik
2004-05-13 10:36           ` Peter C. Chapin
2004-05-13 11:18             ` Martin Krischik
2004-05-13 22:27               ` Peter C. Chapin
2004-05-13 22:54               ` Freejack
2004-05-14  7:13                 ` Martin Krischik
2004-05-14 13:50                   ` Xenos
2004-05-14 17:27                     ` Georg Bauhaus
2004-05-14 17:58                       ` Xenos
2004-05-14 18:49                     ` Martin Krischik
2004-05-14 19:40                       ` Xenos
2004-05-14 22:47                         ` Ludovic Brenta
2004-05-15  8:34                           ` Martin Krischik
2004-05-16  2:55                           ` Hyman Rosen
2004-05-16 13:48                             ` Ludovic Brenta
2004-05-17  2:30                               ` Hyman Rosen
2004-05-17  5:39                                 ` Martin Dowie
2004-05-17  7:48                                   ` Ludovic Brenta
2004-05-17 15:01                                     ` Hyman Rosen
2004-05-17 16:31                                       ` Georg Bauhaus
2004-05-17 17:40                                         ` Hyman Rosen
2004-05-17 19:17                                           ` Georg Bauhaus
2004-05-17  6:24                                 ` Martin Krischik
2004-05-17 19:48                                   ` James Kanze
2004-05-18  6:27                                     ` Martin Krischik [this message]
2004-05-17 12:33                                 ` Dmitry A. Kazakov
2004-05-17 13:46                                   ` Martin Krischik
2004-05-17 15:03                                     ` Dmitry A. Kazakov
2004-05-17 16:02                                   ` Alexander E. Kopilovich
2004-05-18  7:48                                     ` Dmitry A. Kazakov
2004-05-19  1:20                                       ` Alexander E. Kopilovich
2004-05-19  9:59                                         ` Dmitry A. Kazakov
2004-05-19 12:38                                           ` Hyman Rosen
2004-05-19 13:28                                             ` Dmitry A. Kazakov
2004-05-19 13:09                                           ` Georg Bauhaus
2004-05-19 13:44                                             ` Hyman Rosen
2004-05-19 14:17                                               ` Dmitry A. Kazakov
2004-05-19 14:15                                             ` Dmitry A. Kazakov
2004-05-21 11:39                                               ` Georg Bauhaus
2004-05-21 20:33                                                 ` Dmitry A. Kazakov
     [not found]                                                   ` <c8mkor$rlq$1@a1-hrz.uni-duisburg.de>
2004-05-23  1:28                                                     ` Hyman Rosen
2004-05-23  8:55                                                     ` Dmitry A. Kazakov
2004-05-24 11:38                                                       ` Georg Bauhaus
2004-05-24 13:57                                                         ` Dmitry A. Kazakov
2004-05-24 14:40                                                           ` Georg Bauhaus
2004-05-25  8:32                                                             ` Dmitry A. Kazakov
2004-05-25 15:47                                                               ` Georg Bauhaus
     [not found]                                   ` <URJ8Eg0vzF@VB1162.spb.edu>
2004-05-17 16:50                                     ` Marius Amado Alves
2004-05-18  8:27                                       ` Dmitry A. Kazakov
2004-05-15 17:20                     ` Pascal Obry
2004-05-13 19:33             ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox