comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Ada -vs- GNAT
Date: 25 May 2002 03:58:00 -0700
Date: 2002-05-25T10:58:00+00:00	[thread overview]
Message-ID: <5ee5b646.0205250258.7502fb36@posting.google.com> (raw)
In-Reply-To: CAFH8.366$JA7.67654820@newssvr13.news.prodigy.com

tmoran@acm.org wrote in message news:<CAFH8.366$JA7.67654820@newssvr13.news.prodigy.com>...

> >from the Booch Components, which are meant to be, and to a large
> >extent are, compiler-independent. On the other hand, given that GNAT
> >is my preferred compiler (for all sorts of reasons), I felt quite
> >happy to use 'Object_Size when appropriate.

In fact Object_Size is most certainly an essential capability. It was one
of the very unfortunate last minute changes to the Ada 9X spec that you cannot
specify size for subtypes. People are always very confused by the fact that
the size attribute is called subtype specific, but you cannot apply it to
subtypes. What happens is that the compiler is free to assign different
sizes to subtypes (and in some cases forced to by the standard), but the
user has no control whatever over these sizes.

> Which is like being a little bit pregnant.  It means the potential user
> must:  switch to Gnat; start a new branch of the update tree; or not use
> your package.  It makes life simpler for you, harder for your users, and
> (possibly) richer for ACT.  Just remember all those consequences of your
> decision.

Obviously in general packages you do not use non-portable constructs unless
needed. But I want to emaphasize again that there are many many ways of making
code non-portable. Annex M has a lot of entries in it. In our experience when
porting from one compiler to another, attributes and pragmas are unlikely to
be a source of major difficulties, compared to rep clauses and non-portable
use of constructs like address clauses.

It is of course perfectly reasonable to make packages GNAT speicific if there
is some particular gain in doing so. You just have to be sure that such a
package is clearly marked. For example, some packages are designed to work
in an intimate way with the GNAT run time, and obviously such packages are
likely to be GNAT dependent. As for portability, you are not doing so badly
if you make something GNAT dependent, since GNAT is implemented on a wider
range of machines than any other compiler. Indeed I would think a much more
limiting decision is to use packages that are tied to one particular machine
or proprietary operating systems.



  parent reply	other threads:[~2002-05-25 10:58 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
2002-05-25  4:21 ` Simon Wright
2002-05-25  5:48   ` tmoran
2002-05-25  7:36     ` Pascal Obry
2002-05-28 13:14       ` Marin David Condic
2002-05-25  7:52     ` Simon Wright
2002-05-25 10:58     ` Robert Dewar [this message]
2002-05-25 18:28       ` tmoran
2002-05-25 21:52         ` Brian Rogoff
2002-05-26  5:20           ` David Botton
2002-05-26  9:11         ` Preben Randhol
2002-05-26 11:13           ` Simon Wright
2002-05-26 12:57             ` Preben Randhol
2002-05-25 17:38     ` Richard Riehle
2002-05-25 18:37       ` tmoran
2002-05-25 20:13         ` Richard Riehle
2002-05-28 13:47       ` Marin David Condic
2002-05-28 17:55       ` Stephen Leake
2002-05-28 18:35         ` Marin David Condic
2002-05-28 21:42         ` Robert I. Eachus
2002-05-25  7:55   ` Simon Wright
2002-05-25 11:04   ` Robert Dewar
2002-05-25 11:23     ` Simon Wright
2002-05-25 11:51   ` Larry Kilgallen
2002-05-25 15:34     ` Robert Dewar
2002-05-25 20:09   ` Robert C. Leif
2002-05-25  7:27 ` Pascal Obry
2002-05-25  7:41 ` Preben Randhol
2002-05-25 14:46   ` Steve Doiel
2002-05-25 17:03     ` Preben Randhol
2002-05-25 17:10       ` Pascal Obry
2002-05-25 17:17         ` Preben Randhol
2002-05-25 22:23     ` Robert Dewar
2002-05-25 23:24       ` Steve Doiel
2002-05-26  9:21         ` Preben Randhol
2002-05-28 13:58         ` Marin David Condic
2002-05-29 11:13           ` Preben Randhol
2002-06-28 18:25             ` pontius
2002-05-25 15:35   ` Robert Dewar
2002-05-25  8:00 ` chris.danx
2002-05-25 15:37   ` Robert Dewar
2002-05-25 15:53     ` chris.danx
2002-05-25 17:02       ` Pascal Obry
2002-05-25 17:50         ` chris.danx
2002-05-25 18:04           ` Pascal Obry
2002-05-25 22:37           ` Robert Dewar
2002-05-25 22:44             ` chris.danx
2002-05-26  2:05               ` Robert Dewar
2002-05-25 22:31       ` Robert Dewar
2002-05-26  5:29   ` David Botton
2002-05-25 10:49 ` Robert Dewar
2002-05-25 11:02 ` Robert Dewar
2002-05-28 18:09   ` Stephen Leake
2002-05-25 11:09 ` Robert Dewar
2002-06-07 22:39 ` Randy Brukardt
2002-06-08 12:14   ` Robert Dewar
2002-06-08 19:37     ` SteveD
2002-06-09 12:13       ` Robert Dewar
2002-06-12 17:07         ` Warren W. Gay VE3WWG
2002-06-09 18:05       ` Robert Dewar
2002-06-09 18:06     ` Richard Riehle
2002-06-10 21:22       ` Robert A Duff
replies disabled

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