comp.lang.ada
 help / color / mirror / Atom feed
* Ada -vs- GNAT
@ 2002-05-25  2:47 Steve Doiel
  2002-05-25  4:21 ` Simon Wright
                   ` (7 more replies)
  0 siblings, 8 replies; 62+ messages in thread
From: Steve Doiel @ 2002-05-25  2:47 UTC (permalink / raw)


I've been using Ada for a several years now.  In my opinion one of the
greatest strengths of the language is in its portability.  I find it
reassuring that different vendors distribute the same reference manual for
the language.

Recently I did some work with XML/Ada and found a few pieces code dependent
on the GNAT specific attributes 'img and 'unrestricted_access.  I was able
to make the code work with ObjectAda (and any other Ada compiler) by making
a few small changes to the sources.

Personally I find the introduction of attributes and pragmas that are not
essential to be undesirable.

In a recent thread on the gcc mailing list, Robert Dewar describes how ACT
introduced the pragma "Unreferened" such that code that previously appeared
as:

  pragma Warnings (Off, entitiy)

could be replaced by

  pragma Unreferenced (entity)

because the latter is "neater, reads better, and is clearer why it is
there."

In the GCC context this type of change requires that GCC 3.2 be built with
GCC 3.1 and no earlier version.

In my opinion these extensions should only be added by revision to the
standard or as work-arounds when you come up against a brick wall.

Since I am not currently a supported customer of ACT, I have no grounds to
complain, but am interested in what other people think.

SteveD








^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
@ 2002-05-25  4:21 ` Simon Wright
  2002-05-25  5:48   ` tmoran
                     ` (4 more replies)
  2002-05-25  7:27 ` Pascal Obry
                   ` (6 subsequent siblings)
  7 siblings, 5 replies; 62+ messages in thread
From: Simon Wright @ 2002-05-25  4:21 UTC (permalink / raw)


"Steve Doiel" <nospam_steved94@attbi.com> writes:

> I've been using Ada for a several years now.  In my opinion one of the
> greatest strengths of the language is in its portability.  I find it
> reassuring that different vendors distribute the same reference manual for
> the language.

With a tailored version of Annex M.

> Recently I did some work with XML/Ada and found a few pieces code dependent
> on the GNAT specific attributes 'img and 'unrestricted_access.  I was able
> to make the code work with ObjectAda (and any other Ada compiler) by making
> a few small changes to the sources.

Which seems a reasonable idea. I (hope I) have removed all "'Img"s
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.

> Personally I find the introduction of attributes and pragmas that are not
> essential to be undesirable.
> 
> In a recent thread on the gcc mailing list, Robert Dewar describes how ACT
> introduced the pragma "Unreferened" such that code that previously appeared
> as:
> 
>   pragma Warnings (Off, entitiy)
> 
> could be replaced by
> 
>   pragma Unreferenced (entity)
> 
> because the latter is "neater, reads better, and is clearer why it is
> there."

Of course pragma Warnings is implementation-defined too.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  4:21 ` Simon Wright
@ 2002-05-25  5:48   ` tmoran
  2002-05-25  7:36     ` Pascal Obry
                       ` (3 more replies)
  2002-05-25  7:55   ` Simon Wright
                     ` (3 subsequent siblings)
  4 siblings, 4 replies; 62+ messages in thread
From: tmoran @ 2002-05-25  5:48 UTC (permalink / raw)


>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.
  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.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
  2002-05-25  4:21 ` Simon Wright
@ 2002-05-25  7:27 ` Pascal Obry
  2002-05-25  7:41 ` Preben Randhol
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 62+ messages in thread
From: Pascal Obry @ 2002-05-25  7:27 UTC (permalink / raw)



"Steve Doiel" <nospam_steved94@attbi.com> writes:

> In a recent thread on the gcc mailing list, Robert Dewar describes how ACT
> introduced the pragma "Unreferened" such that code that previously appeared
> as:
> 
>   pragma Warnings (Off, entitiy)
> 
> could be replaced by
> 
>   pragma Unreferenced (entity)
> 
> because the latter is "neater, reads better, and is clearer why it is
> there."

Well there is a big difference too. Warnings Off is used to avoid the warnings
on unreferenced entity. But if later you start using it the compiler will
remain silent. Unreferenced said that the entity is unreferenced and if you
start using it you'll get a warnings. This will oblige you to revisit the code
and eventually remove the pragma.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 62+ messages in thread
From: Pascal Obry @ 2002-05-25  7:36 UTC (permalink / raw)



tmoran@acm.org writes:

>   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.

I agree with your point. But since many libraries are missing from the Ada
standard it is hard to not do so. This was one goal for AWS (not using
compiler specific packages)... But it would have been too much work to
implement an equivalent for GNAT.Regexp, GNAT.Regpat, GNAT.Table,
GNAT.Directory_Operations and GNAT.Calendar.Time_IO...

Maybe this will change with the next Ada revision, but I don't think most
hobbyist have the resources to buy all Ada compilers around and spend time to
check wether the program works with all compilers or to build all kind of
helper libraries, you want to concentrate your effort on the main problem (for
AWS it was on the Web framework) especially since free time is quite
expensive ;) And yes in this context GNAT is the compiler of choice... 
Building Open Source software with an Open Source compiler.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
  2002-05-25  4:21 ` Simon Wright
  2002-05-25  7:27 ` Pascal Obry
@ 2002-05-25  7:41 ` Preben Randhol
  2002-05-25 14:46   ` Steve Doiel
  2002-05-25 15:35   ` Robert Dewar
  2002-05-25  8:00 ` chris.danx
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 62+ messages in thread
From: Preben Randhol @ 2002-05-25  7:41 UTC (permalink / raw)


On Sat, 25 May 2002 02:47:52 GMT, Steve Doiel wrote:
> 
> Recently I did some work with XML/Ada and found a few pieces code dependent
> on the GNAT specific attributes 'img and 'unrestricted_access.  I was able
> to make the code work with ObjectAda (and any other Ada compiler) by making
> a few small changes to the sources.

I think you should submit it to the developers of XML/Ada so they can
use it.

The point is that sometimes things gets more easy and portable if you
use GNAT. Especially IO operations on different platforms. At the moment
I use some GNAT procedures in my program due to this. But of course if
somebody else would like to compile it (when I release it) with a
different compiler, then I would really like to have a copy of the
changes they did to make it compiler independant. The 'Img I only use
for debugging purposes as it is faster to put in a 

   Put_Line (Some_Value'Img)

which will be removed as soon as I locate the problem.

Preben



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  5:48   ` tmoran
  2002-05-25  7:36     ` Pascal Obry
@ 2002-05-25  7:52     ` Simon Wright
  2002-05-25 10:58     ` Robert Dewar
  2002-05-25 17:38     ` Richard Riehle
  3 siblings, 0 replies; 62+ messages in thread
From: Simon Wright @ 2002-05-25  7:52 UTC (permalink / raw)


tmoran@acm.org writes:

> >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.

>   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.

:blush: what I meant to say was that, _in a different project_
(ColdFrame) I did this. The BCs are spotless. Sorry, all.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  4:21 ` Simon Wright
  2002-05-25  5:48   ` tmoran
@ 2002-05-25  7:55   ` Simon Wright
  2002-05-25 11:04   ` Robert Dewar
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 62+ messages in thread
From: Simon Wright @ 2002-05-25  7:55 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> Which seems a reasonable idea. I (hope I) have removed all "'Img"s
> 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.

And "when appropriate" was _not_ in the BCs. There are no "'Img"s in
the BCs by design (I see there are a couple in one temporary test file
that's not part of the distribution).



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
                   ` (2 preceding siblings ...)
  2002-05-25  7:41 ` Preben Randhol
@ 2002-05-25  8:00 ` chris.danx
  2002-05-25 15:37   ` Robert Dewar
  2002-05-26  5:29   ` David Botton
  2002-05-25 10:49 ` Robert Dewar
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 62+ messages in thread
From: chris.danx @ 2002-05-25  8:00 UTC (permalink / raw)



"Steve Doiel" <nospam_steved94@attbi.com> wrote in message
news:sXCH8.103053$Po6.225647@rwcrnsc52.ops.asp.att.net...

> Recently I did some work with XML/Ada and found a few pieces code
dependent
> on the GNAT specific attributes 'img and 'unrestricted_access.  I was able
> to make the code work with ObjectAda (and any other Ada compiler) by
making
> a few small changes to the sources.

Will you be putting it up anywhere?  It might be nice to have compiler
independant versions of things like this.

Several of the biggy useful tools like gwindows, gnatcom, and possibly
gtkada (with emphasis on the possibly) use gnat dependant features, which
deters their use in other compilers.  It'd be interesting to see how much
code is actually gnat dependant in those tools.

> In a recent thread on the gcc mailing list, Robert Dewar describes how ACT
> introduced the pragma "Unreferened" such that code that previously
appeared
> as:
>
>   pragma Warnings (Off, entitiy)
>
> could be replaced by
>
>   pragma Unreferenced (entity)
>
> because the latter is "neater, reads better, and is clearer why it is
> there."

To me it's just clutter, but what do I know?


Chris





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
                   ` (3 preceding siblings ...)
  2002-05-25  8:00 ` chris.danx
@ 2002-05-25 10:49 ` Robert Dewar
  2002-05-25 11:02 ` Robert Dewar
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 10:49 UTC (permalink / raw)


"Steve Doiel" <nospam_steved94@attbi.com> wrote in message news:<sXCH8.103053$Po6.225647@rwcrnsc52.ops.asp.att.net>...

> Personally I find the introduction of attributes and pragmas that are not
> essential to be undesirable.

Well of course essential is somewhat in the eye of the beholder, but
if you
want to be sure of not using any non-standard pragmas you can use

pragma Restrictions (No_Implementation_Pragmas);

and/or

pragma Restrictions (No_Implementation_Attributes);

All Ada compilers introduce implementation pragmas and attributes.
Furthermore
there are of course dozens of oher ways in which the behavior of code
can be
implementation dependent (see annex M of the standard).

Note that the restrictions above are also implementation dependent,
but the
ARG has recommended that these be added to the language (along with
some other
attributes and pragmas introduced by GNAT, including Unsuppress).

By the way, you were lucky that you could get around the use of
Unrestricted_Access. When applied to procedures, this provides very
important (essential?) capabilities that are just not obtainable
easily any other way (it is a real shame that the language got a bit
crippled here by concerns of specific vendors about transitioning
their existing Ada 83 compilers).



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  5:48   ` tmoran
  2002-05-25  7:36     ` Pascal Obry
  2002-05-25  7:52     ` Simon Wright
@ 2002-05-25 10:58     ` Robert Dewar
  2002-05-25 18:28       ` tmoran
  2002-05-25 17:38     ` Richard Riehle
  3 siblings, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 10:58 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
                   ` (4 preceding siblings ...)
  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
  7 siblings, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 11:02 UTC (permalink / raw)


"Steve Doiel" <nospam_steved94@attbi.com> wrote in message news:<sXCH8.103053$Po6.225647@rwcrnsc52.ops.asp.att.net>...

>   pragma Warnings (Off, entitiy)
> 
> could be replaced by
> 
>   pragma Unreferenced (entity)
> 
> because the latter is "neater, reads better, and is clearer why it is
> there."
> 
> In the GCC context this type of change requires that GCC 3.2 be built with
> GCC 3.1 and no earlier version.

We have *always* had an absolute rule that any version of GNAT must be
built
with the previous version. In the GCC FSF context, some have argued
for relaxing this requirement, and indeed have tried violating it,
sometimes
with the result of running into very strange and difficult problems.

So I *strongly* advise anyone building GNAT to do so using the
previous
version, whatever you might read elsewhere. No point in buying
problems
you don't need.

Why do we recommend this?

a) because that's the way we test things, why pioneer untested
territory

b) because we dislike keeping bootstrap path kludges in the sources
any longer
than necessary. The particular example above is a good one. Pragma
Warnings (Off) is a blunt tool which may suppress other relevant
warnings (as you
probably know GNAT sources require no warnings ever to be generated).
The
new Unreferenced pragma is extremely useful for keeping the valuable
new
warning on unreferenced parameters whlie allowing it to be selectively
turned off where necessary.

I actually am arguing very strongly for 3.2 to require 3.1 in the FSF
environment for all sorts of reasons (it is interesting to note that
those
arguing against it are people who are typically outside the Ada
community
who are used to being able to compile C with any old compiler :-)

Robert Dewar
Ada Core Technologies



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  4:21 ` Simon Wright
  2002-05-25  5:48   ` tmoran
  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 20:09   ` Robert C. Leif
  4 siblings, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 11:04 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote in message news:<x7vlma8g8m9.fsf@pushface.org>...

> Of course pragma Warnings is implementation-defined too.

But absolutely essential in my view. Because it is very important to always
compile with warnings turned on, but it is in the nature of warnings to
generate false positives sometimes, and you need a way of turning them off.

Robert dewar
Ada Core Technologies



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
                   ` (5 preceding siblings ...)
  2002-05-25 11:02 ` Robert Dewar
@ 2002-05-25 11:09 ` Robert Dewar
  2002-06-07 22:39 ` Randy Brukardt
  7 siblings, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 11:09 UTC (permalink / raw)


"Steve Doiel" <nospam_steved94@attbi.com> wrote in message news:<sXCH8.103053$Po6.225647@rwcrnsc52.ops.asp.att.net>...

> Since I am not currently a supported customer of ACT, I have no grounds to
> complain, but am interested in what other people think.

Seeing as 

a) many/most of the implementation dependent pragmas/atttributes come from
customer requests

b) we never have had the experience of supported customers complaining about
extra features that they don't have to use. Probably this is because large
serious Ada projects are very careful to specify what features they can or
cannot use, and very clear about portability requirements [for many of our
customers running their apps on non-GNAT compilers is not an issue]

It's probably not relevant. The important rule is not to use implementation
dependent features if you don't want to be dependent on the implementation.
That's a pretty simple rule to follow (and trivial to follow in the case of
pragmas and attributes as noted previously.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 11:04   ` Robert Dewar
@ 2002-05-25 11:23     ` Simon Wright
  0 siblings, 0 replies; 62+ messages in thread
From: Simon Wright @ 2002-05-25 11:23 UTC (permalink / raw)


dewar@gnat.com (Robert Dewar) writes:

> Simon Wright <simon@pushface.org> wrote in message news:<x7vlma8g8m9.fsf@pushface.org>...
> 
> > Of course pragma Warnings is implementation-defined too.
> 
> But absolutely essential in my view. Because it is very important to
> always compile with warnings turned on, but it is in the nature of
> warnings to generate false positives sometimes, and you need a way
> of turning them off.

I completely agree.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  4:21 ` Simon Wright
                     ` (2 preceding siblings ...)
  2002-05-25 11:04   ` Robert Dewar
@ 2002-05-25 11:51   ` Larry Kilgallen
  2002-05-25 15:34     ` Robert Dewar
  2002-05-25 20:09   ` Robert C. Leif
  4 siblings, 1 reply; 62+ messages in thread
From: Larry Kilgallen @ 2002-05-25 11:51 UTC (permalink / raw)


In article <x7vlma8g8m9.fsf@pushface.org>, Simon Wright <simon@pushface.org> writes:
> "Steve Doiel" <nospam_steved94@attbi.com> writes:

>> Recently I did some work with XML/Ada and found a few pieces code dependent
>> on the GNAT specific attributes 'img and 'unrestricted_access.  I was able
>> to make the code work with ObjectAda (and any other Ada compiler) by making
>> a few small changes to the sources.
> 
> Which seems a reasonable idea. I (hope I) have removed all "'Img"s
> 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.

It would be best if GNAT had a simple compiler option to say:

	Complain about use of any non-standard features.

I am not in a position to say whether GNAT currently has such an option.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  7:41 ` Preben Randhol
@ 2002-05-25 14:46   ` Steve Doiel
  2002-05-25 17:03     ` Preben Randhol
  2002-05-25 22:23     ` Robert Dewar
  2002-05-25 15:35   ` Robert Dewar
  1 sibling, 2 replies; 62+ messages in thread
From: Steve Doiel @ 2002-05-25 14:46 UTC (permalink / raw)


"Preben Randhol" <randhol+abuse@pvv.org> wrote in message
news:slrnaeug17.pa.randhol+abuse@kiuk0156.chembio.ntnu.no...
> On Sat, 25 May 2002 02:47:52 GMT, Steve Doiel wrote:
> >
> > Recently I did some work with XML/Ada and found a few pieces code
dependent
> > on the GNAT specific attributes 'img and 'unrestricted_access.  I was
able
> > to make the code work with ObjectAda (and any other Ada compiler) by
making
> > a few small changes to the sources.
>
> I think you should submit it to the developers of XML/Ada so they can
> use it.

I plan to do so.

> The point is that sometimes things gets more easy and portable if you
> use GNAT. Especially IO operations on different platforms. At the moment
> I use some GNAT procedures in my program due to this. But of course if
> somebody else would like to compile it (when I release it) with a
> different compiler, then I would really like to have a copy of the
> changes they did to make it compiler independant. The 'Img I only use
> for debugging purposes as it is faster to put in a
>
>    Put_Line (Some_Value'Img)
>

Why not use
     Put_Line( Some_Type'Image( Some_Value ) )

and avoid the habit of using non-standard features.

SteveD

> which will be removed as soon as I locate the problem.
>
> Preben





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 11:51   ` Larry Kilgallen
@ 2002-05-25 15:34     ` Robert Dewar
  0 siblings, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 15:34 UTC (permalink / raw)


Kilgallen@SpamCop.net (Larry Kilgallen) wrote in message news:<PWSwxbVFvr+Q@eisner.encompasserve.org>...
> I am not in a position to say whether GNAT currently has 
> such an option.

Sure you are! The documentation is freely available :-)

See my previous post on pragma Restrictions. That feature
has been in GNAT for a long long time.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  7:41 ` Preben Randhol
  2002-05-25 14:46   ` Steve Doiel
@ 2002-05-25 15:35   ` Robert Dewar
  1 sibling, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 15:35 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> wrote in message news:<slrnaeug17.pa.randhol+abuse@kiuk0156.chembio.ntnu.no> > The 'Img I only use
> for debugging purposes as it is faster to put in a 
> 
>    Put_Line (Some_Value'Img)
> 
> which will be removed as soon as I locate the problem.

Indeed! That's what it is for. Using 'Img in distributed
code is just a careless mistake. If you can't trust yourself to avoid
such careless mistakes, use the
Restrictions pragma :-)



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  8:00 ` chris.danx
@ 2002-05-25 15:37   ` Robert Dewar
  2002-05-25 15:53     ` chris.danx
  2002-05-26  5:29   ` David Botton
  1 sibling, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 15:37 UTC (permalink / raw)


"chris.danx" <spamoff.danx@ntlworld.com> wrote in message news:<UwHH8.1309$Uk6.141589@news6-win.server.ntlworld.com>.

> To me it's just clutter, but what do I know?

What are you saying is clutter here? Using either pragma
in this case? If so, you are definitely wrong. Without
either of these two pragmas, the code is illegal in the
context say of the GNAT library which can only be compiled
with -gnatg, so you MUST use one of these two pragmas. I
hope no one thinks the gnat run time library should be
independent of GNAT :-)



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 15:37   ` Robert Dewar
@ 2002-05-25 15:53     ` chris.danx
  2002-05-25 17:02       ` Pascal Obry
  2002-05-25 22:31       ` Robert Dewar
  0 siblings, 2 replies; 62+ messages in thread
From: chris.danx @ 2002-05-25 15:53 UTC (permalink / raw)



"Robert Dewar" <dewar@gnat.com> wrote in message
news:5ee5b646.0205250737.4ec74872@posting.google.com...
> "chris.danx" <spamoff.danx@ntlworld.com> wrote in message
news:<UwHH8.1309$Uk6.141589@news6-win.server.ntlworld.com>.
>
> > To me it's just clutter, but what do I know?
>
> What are you saying is clutter here? Using either pragma
> in this case?

No, having two pragmas that do the same thing is what IMO is clutter (when
just one will do, and there's one already present).  Perhaps I should say
what I mean by clutter, I mean it's more or less another name for the same
thing, so it could be uneccessary.  It may make it easier to read, but it's
just a short hand for something.

I'm relying on what Steve posted, and don't know if there's any other
difference related to this pragma apart from the shorthand.







^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 15:53     ` chris.danx
@ 2002-05-25 17:02       ` Pascal Obry
  2002-05-25 17:50         ` chris.danx
  2002-05-25 22:31       ` Robert Dewar
  1 sibling, 1 reply; 62+ messages in thread
From: Pascal Obry @ 2002-05-25 17:02 UTC (permalink / raw)



"chris.danx" <spamoff.danx@ntlworld.com> writes:

> "Robert Dewar" <dewar@gnat.com> wrote in message
> news:5ee5b646.0205250737.4ec74872@posting.google.com...
> > "chris.danx" <spamoff.danx@ntlworld.com> wrote in message
> news:<UwHH8.1309$Uk6.141589@news6-win.server.ntlworld.com>.
> >
> > > To me it's just clutter, but what do I know?
> >
> > What are you saying is clutter here? Using either pragma
> > in this case?
> 
> No, having two pragmas that do the same thing is what IMO is clutter (when
> just one will do, and there's one already present).  Perhaps I should say
> what I mean by clutter, I mean it's more or less another name for the same
> thing, so it could be uneccessary.  It may make it easier to read, but it's
> just a short hand for something.

That's wrong ! There is no short hand here. Read my previous post.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 14:46   ` Steve Doiel
@ 2002-05-25 17:03     ` Preben Randhol
  2002-05-25 17:10       ` Pascal Obry
  2002-05-25 22:23     ` Robert Dewar
  1 sibling, 1 reply; 62+ messages in thread
From: Preben Randhol @ 2002-05-25 17:03 UTC (permalink / raw)


On Sat, 25 May 2002 14:46:28 GMT, Steve Doiel wrote:
> Why not use
>      Put_Line( Some_Type'Image( Some_Value ) )
> 
> and avoid the habit of using non-standard features.

You misunderstood me. I do that for any code I want to keep in my
program. However if I see that my program is faulty, I usually put in
some Put_Line's to give me some hints to what is the problem. I find
this approach faster than using a debugger when I know where the problem
is. If I cannot figure it out I use a debugger of course. The important
thing is that I remove the Put_Line when I'm certain that the problem is
fixed. :-)

Preben




^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 17:03     ` Preben Randhol
@ 2002-05-25 17:10       ` Pascal Obry
  2002-05-25 17:17         ` Preben Randhol
  0 siblings, 1 reply; 62+ messages in thread
From: Pascal Obry @ 2002-05-25 17:10 UTC (permalink / raw)



Preben Randhol <randhol+abuse@pvv.org> writes:

> On Sat, 25 May 2002 14:46:28 GMT, Steve Doiel wrote:
> > Why not use
> >      Put_Line( Some_Type'Image( Some_Value ) )
> > 
> > and avoid the habit of using non-standard features.
> 
> You misunderstood me. I do that for any code I want to keep in my
                         ^^^^^^
      you mean:         I do not do
> program. However if I see that my program is faulty, I usually put in
> some Put_Line's to give me some hints to what is the problem. I find

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 17:10       ` Pascal Obry
@ 2002-05-25 17:17         ` Preben Randhol
  0 siblings, 0 replies; 62+ messages in thread
From: Preben Randhol @ 2002-05-25 17:17 UTC (permalink / raw)


On 25 May 2002 19:10:59 +0200, Pascal Obry wrote:
> 
> Preben Randhol <randhol+abuse@pvv.org> writes:
> 
>> On Sat, 25 May 2002 14:46:28 GMT, Steve Doiel wrote:
>> > Why not use
>> >      Put_Line( Some_Type'Image( Some_Value ) )
>> > 
>> > and avoid the habit of using non-standard features.
>> 
>> You misunderstood me. I do that for any code I want to keep in my
>                          ^^^^^^
>       you mean:         I do not do
No sorry I meant:         I do this (as written above) ...

Preben



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  5:48   ` tmoran
                       ` (2 preceding siblings ...)
  2002-05-25 10:58     ` Robert Dewar
@ 2002-05-25 17:38     ` Richard Riehle
  2002-05-25 18:37       ` tmoran
                         ` (2 more replies)
  3 siblings, 3 replies; 62+ messages in thread
From: Richard Riehle @ 2002-05-25 17:38 UTC (permalink / raw)


tmoran@acm.org wrote:

>   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.

Let me take a Devil's advocate position for a change.

Some years ago, Bill Joy gave a talk at an ACM meeting where he
lambasted the idea of standards.    He is not alone in this view. For
many software developers, standards simply inhibit creativity, not
to mention productivity.

We often cite the ISO standardization of Ada as a positive feature of
the language, while others cite the standardization of C++ as a
handicap.    In an article in THINK magazine in 1964, someone wrote,
"The last act of a dying organization is to enlarge the rule book."  Many
of us have seen that happen where a company on the brink of bankruptcy
suddenly begins to enforce its dress code or work-hour rules.

It may be that the last act of a dying computer language is to seek ISO
standardization.     One reason for the reaction against traditional
software engineering in the Agile Programming movement is the
inability to get things done using the formalisms and standards that
keep popping up to thwart success.    XP is a reaction to the Industrial
Engineering model that has characterized so much software engineering
practice.

When a Standard keeps a language from meeting its full potential, is that
a good thing.  When we insist that no construct may be used that
is not in the standard, is that not like saying we abhor innovation.   I
once noted, while working on an Army project, that the military is one
of those places where innovation lasts -- and lasts -- and lasts.   We
can all think of times when  bureaucratic trifles prevented some good
idea from going forward.    Ceremony may be useful as a way of
comforting the uneasy with a sense of the familiar, but it does little
to promote progress.

So, it ACT deems it useful to add something as simply as attibutes to its
compiler to accomplish things not pre-determined by the standard, so
be it.    This could be one of the features that differentiates their product

from that of other compiler publishers.   If I recall correctly, the Ada
standard recognizes the reality that there may be occasional needs to
stray from the strict canon of the standard.

Let's not be the kind of people for who innovation lasts -- and lasts -- and
lasts.

Richard Riehle







^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  0 siblings, 2 replies; 62+ messages in thread
From: chris.danx @ 2002-05-25 17:50 UTC (permalink / raw)



"Pascal Obry" <p.obry@wanadoo.fr> wrote in message
news:usn4g88ku.fsf@wanadoo.fr...
>
> "chris.danx" <spamoff.danx@ntlworld.com> writes:
>
> > No, having two pragmas that do the same thing is what IMO is clutter
(when
> > just one will do, and there's one already present).  Perhaps I should
say
> > what I mean by clutter, I mean it's more or less another name for the
same
> > thing, so it could be uneccessary.  It may make it easier to read, but
it's
> > just a short hand for something.
>
> That's wrong ! There is no short hand here. Read my previous post.

ok, in view of that I agree it's a useful addition but why only warnings?
Surely to reference a thing you've said you won't is an error not only
warning worthy?


Chris





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 17:50         ` chris.danx
@ 2002-05-25 18:04           ` Pascal Obry
  2002-05-25 22:37           ` Robert Dewar
  1 sibling, 0 replies; 62+ messages in thread
From: Pascal Obry @ 2002-05-25 18:04 UTC (permalink / raw)



"chris.danx" <spamoff.danx@ntlworld.com> writes:

> ok, in view of that I agree it's a useful addition but why only warnings?
> Surely to reference a thing you've said you won't is an error not only
> warning worthy?

You can ask the compiler to report all warnings as errors. This is possible
with GNAT and I'll be surprised if other Ada compilers do not offer the same
kind of option...

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 10:58     ` Robert Dewar
@ 2002-05-25 18:28       ` tmoran
  2002-05-25 21:52         ` Brian Rogoff
  2002-05-26  9:11         ` Preben Randhol
  0 siblings, 2 replies; 62+ messages in thread
From: tmoran @ 2002-05-25 18:28 UTC (permalink / raw)


> As for portability, you are not doing so badly
> if you make something GNAT dependent,
  I do think you should use your "Ada Core Technologies" signature when
making a statement with such a clear financial impact.

> a much more limiting decision is to use packages that are tied to one
> particular machine or proprietary operating systems.
  I suppose there are small, specialized markets where that's true.
For some programs, being tied to Windows is not a great limitation, however.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  2 siblings, 1 reply; 62+ messages in thread
From: tmoran @ 2002-05-25 18:37 UTC (permalink / raw)


> When we insist that no construct may be used that
> is not in the standard, is that not like saying we abhor innovation.
  I'm not insisting, I would just point out that there may be non-obvious
costs that should be considered before casually locking into one vendor.
We've not found it necessary with Claw to lock in, but I'm sure there
are good reasons other programs might need to.
> >   Which is like being a little bit pregnant.
  Similarly, pregnancy is not always a bad thing. ;) In fact I'm in favor
of both motherhood and applie pie.
(Sorry, couldn't resist.)



^ permalink raw reply	[flat|nested] 62+ messages in thread

* RE: Ada -vs- GNAT
  2002-05-25  4:21 ` Simon Wright
                     ` (3 preceding siblings ...)
  2002-05-25 11:51   ` Larry Kilgallen
@ 2002-05-25 20:09   ` Robert C. Leif
  4 siblings, 0 replies; 62+ messages in thread
From: Robert C. Leif @ 2002-05-25 20:09 UTC (permalink / raw)


From: Bob Leif
To: Simon Wright et al.
The solution to the use of "img" is to make it standard Ada. The present
compiler vendors should implement "img".

-----Original Message-----
From: comp.lang.ada-admin@ada.eu.org
[mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Simon Wright
Sent: Friday, May 24, 2002 9:22 PM
To: comp.lang.ada@ada.eu.org
Subject: Re: Ada -vs- GNAT

"Steve Doiel" <nospam_steved94@attbi.com> writes:

> I've been using Ada for a several years now.  In my opinion one of the
> greatest strengths of the language is in its portability.  I find it
> reassuring that different vendors distribute the same reference manual
for
> the language.

With a tailored version of Annex M.

> Recently I did some work with XML/Ada and found a few pieces code
dependent
> on the GNAT specific attributes 'img and 'unrestricted_access.  I was
able
> to make the code work with ObjectAda (and any other Ada compiler) by
making
> a few small changes to the sources.

Which seems a reasonable idea. I (hope I) have removed all "'Img"s
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.

> Personally I find the introduction of attributes and pragmas that are
not
> essential to be undesirable.
> 
> In a recent thread on the gcc mailing list, Robert Dewar describes how
ACT
> introduced the pragma "Unreferened" such that code that previously
appeared
> as:
> 
>   pragma Warnings (Off, entitiy)
> 
> could be replaced by
> 
>   pragma Unreferenced (entity)
> 
> because the latter is "neater, reads better, and is clearer why it is
> there."

Of course pragma Warnings is implementation-defined too.




^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 18:37       ` tmoran
@ 2002-05-25 20:13         ` Richard Riehle
  0 siblings, 0 replies; 62+ messages in thread
From: Richard Riehle @ 2002-05-25 20:13 UTC (permalink / raw)


tmoran@acm.org wrote:

> > >   Which is like being a little bit pregnant.
>   Similarly, pregnancy is not always a bad thing. ;) In fact I'm in favor
> of both motherhood and applie pie.

However, if you were pregnant, Tom, you might reconsider
that statement.  :-)

Richard Riehle





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  1 sibling, 1 reply; 62+ messages in thread
From: Brian Rogoff @ 2002-05-25 21:52 UTC (permalink / raw)


On Sat, 25 May 2002 tmoran@acm.org wrote:
> > As for portability, you are not doing so badly
> > if you make something GNAT dependent,
>   I do think you should use your "Ada Core Technologies" signature when
> making a statement with such a clear financial impact.

I don't think so. You could replace the context with C and GCC instead of
Ada and GNAT, and I think it would still be true. He didn't say there are
no drawbacks, just that you aren't in a deep hole, like if you were
dependent on some fly by night commercial venture which goes belly up.

> > a much more limiting decision is to use packages that are tied to one
> > particular machine or proprietary operating systems.
>   I suppose there are small, specialized markets where that's true.

Pretty much the entire electronic design automation market meets your
definition of small and specialized. I imagine that similar engineering
intensive markets are also like that.

> For some programs, being tied to Windows is not a great limitation, however.

The kind of programs for which being tied solely to Windows is not a
great limitation probably don't benefit that much from Ada, since many
of the purported advantages of Ada, like standards conformance, and
relative machine independence, are not being utilized.

I guess that GNAT wins either way, since it runs on Windows and lots of
other OSes, and I can choose to adhere to the standard or not. :-)

-- Brian





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 14:46   ` Steve Doiel
  2002-05-25 17:03     ` Preben Randhol
@ 2002-05-25 22:23     ` Robert Dewar
  2002-05-25 23:24       ` Steve Doiel
  1 sibling, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 22:23 UTC (permalink / raw)


"Steve Doiel" <nospam_steved94@attbi.com> wrote in message news:<8tNH8.76854$L76.130053@rwcrnsc53>...
> "Preben Randhol" <randhol+abuse@pvv.org> wrote in message
> news:slrnaeug17.pa.randhol+abuse@kiuk0156.chembio.ntnu.no...
> > On Sat, 25 May 2002 02:47:52 GMT, Steve Doiel wrote:
> > >
> > > Recently I did some work with XML/Ada and found a few pieces code
>  dependent
> > > on the GNAT specific attributes 'img and 'unrestricted_access.  I was
>  able
> > > to make the code work with ObjectAda (and any other Ada compiler) by
>  making
> > > a few small changes to the sources.
> >
> Why not use
>      Put_Line( Some_Type'Image( Some_Value ) )
> 
> and avoid the habit of using non-standard features.

Because when you are writing debugging statements, it is
a time when convenience of writing dominates maintenance
and readability concerns (since they don't arise). So 
that's when 'Img is useful (although we had in mind 
originally that 'Img should remove the dratted space
in front of integers and also allow arrays, records etc).
(again for convenience of debugging).



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 15:53     ` chris.danx
  2002-05-25 17:02       ` Pascal Obry
@ 2002-05-25 22:31       ` Robert Dewar
  1 sibling, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 22:31 UTC (permalink / raw)


"chris.danx" <spamoff.danx@ntlworld.com> wrote in message news:<BsOH8.1754$t8.377092@news11-gui.server.ntli.net>...

> No, having two pragmas that do the same thing is what IMO 
> is clutter (when just one will do, and there's one
> already present)

> I'm relying on what Steve posted, and don't know if 
> there's any other difference related to this pragma apart 
> from the shorthand.

 Do you imagine that we would have two pragmas that
 did exactly the same thing in a case like this (where we
 are introducing the pragmas?) [we do have some equivalent
 pragmas when we are copying pragmas from others :-)]

 And that if we did, we would perturb the bootstrap path
 to replace a pragma by something equivalent?

We are not that lunatic :-)

pragma Warnings (Off, entity) kills *all* warnings for the
given entity. It is a blunt tool indeed for this purpose.

pragma Unreferenced (Entity) is a specification that the
given entity is intentionally unreferenced. It not only
kills the warning for the entity not being referenced, but
it also generates a warning if it *is* referenced. In other
words it is a clear specification. Also it does NOT kill
any other warnings related to the entity.

So pragma Unreferenced is really *far* more appropriate. It
is more effective and much more clearly self documenting as
to what is going on.

We *far* prefer to use pragma Unreferenced for unreferenced
formals, but we can't do it yet, because it would create
a bootstrap path problem.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  1 sibling, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-05-25 22:37 UTC (permalink / raw)


"chris.danx" <spamoff.danx@ntlworld.com> wrote in message news:<H9QH8.4661$Uk6.618094@news6-win.server.ntlworld.com>.> ok, in view of that I agree it's a useful addition but 
> why only warnings? Surely to reference a thing you've 
> said you won't is an error not only warning worthy?

Because we read the RM, and try to follow it carefully :-)

Read the implementation advice in 2.8(17-19):

17   Normally, an implementation should not define pragmas that can
make an illegal program legal, except as follows:

   18  A pragma used to complete a declaration, such as a 
       pragma Import;

   19  A pragma used to configure the environment by 
       adding, removing, or replacing library_items.

Since this pragma does neither, you are recommending a
violation of advice in the RM :-) and we would have to
document this in Annex M saying why we are doing it!



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 22:37           ` Robert Dewar
@ 2002-05-25 22:44             ` chris.danx
  2002-05-26  2:05               ` Robert Dewar
  0 siblings, 1 reply; 62+ messages in thread
From: chris.danx @ 2002-05-25 22:44 UTC (permalink / raw)



"Robert Dewar" <dewar@gnat.com> wrote in message
news:5ee5b646.0205251437.ef0cdd6@posting.google.com...


> Read the implementation advice in 2.8(17-19):
>
> 17   Normally, an implementation should not define pragmas that can
> make an illegal program legal, except as follows:
>
>    18  A pragma used to complete a declaration, such as a
>        pragma Import;
>
>    19  A pragma used to configure the environment by
>        adding, removing, or replacing library_items.
>
> Since this pragma does neither, you are recommending a
> violation of advice in the RM :-) and we would have to
> document this in Annex M saying why we are doing it!

I wasn't recommending anything.  I simply asked why a warning was generated
instead an error, and you've answered that.


Thanks,
Chris





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  0 siblings, 2 replies; 62+ messages in thread
From: Steve Doiel @ 2002-05-25 23:24 UTC (permalink / raw)


"Robert Dewar" <dewar@gnat.com> wrote in message
news:5ee5b646.0205251423.1273b6b7@posting.google.com...
> "Steve Doiel" <nospam_steved94@attbi.com> wrote in message
news:<8tNH8.76854
[snip]
> > Why not use
> >      Put_Line( Some_Type'Image( Some_Value ) )
> >
> > and avoid the habit of using non-standard features.
>
> Because when you are writing debugging statements, it is
> a time when convenience of writing dominates maintenance
> and readability concerns (since they don't arise). So
> that's when 'Img is useful (although we had in mind
> originally that 'Img should remove the dratted space
> in front of integers and also allow arrays, records etc).
> (again for convenience of debugging).

This reminds me of an experience I had a number of years ago when installing
a computer system in a sawmill.  We were installing a system on a weekend
and required production monday morning.

The electrical contractor had not provided enough power outlets in the
computer room so as a temporary measure an electrician ran an extension cord
across the mill floor, assuring me that would do the correct wiring the
following weekend.

I visited the mill 5 years later.  The extension cord was still there.

Quick fixes often stay in place longer than intended.

Based on my experience I would say that I agree to disagree.

SteveD






^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 22:44             ` chris.danx
@ 2002-05-26  2:05               ` Robert Dewar
  0 siblings, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-05-26  2:05 UTC (permalink / raw)


"chris.danx" <spamoff.danx@ntlworld.com> wrote in message news:<CtUH8.6089$Uk6.853831@news6-win.server.ntlworld.com>.

> I wasn't recommending anything.  I simply asked why a
> warning was generated instead an error, and you've 
> answered that.

Fair enough. Note that in practice we always run with -gnatwe, so
warnings are treated as errors anyway.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 21:52         ` Brian Rogoff
@ 2002-05-26  5:20           ` David Botton
  0 siblings, 0 replies; 62+ messages in thread
From: David Botton @ 2002-05-26  5:20 UTC (permalink / raw)


"Brian Rogoff" <bpr@bpr.best.vwh.net> wrote
> The kind of programs for which being tied solely to Windows is not a
> great limitation probably don't benefit that much from Ada

There is always benefit in using Ada :-)

David Botton





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  8:00 ` chris.danx
  2002-05-25 15:37   ` Robert Dewar
@ 2002-05-26  5:29   ` David Botton
  1 sibling, 0 replies; 62+ messages in thread
From: David Botton @ 2002-05-26  5:29 UTC (permalink / raw)


Being author of two of the three, I certainly wouldn't mind some one helping
out and porting GNATCOM and GWindows to other compilers :-)

It's a time thingy more than anything. I've hit a few brick walls (certainly
that can be passed over, I just don't have the time to write the
fixes/changes or research the hows to over come them...) not related to the
GNAT specific extensions I've used.

David Botton


"chris.danx" <spamoff.danx@ntlworld.com> wrote in message
news:UwHH8.1309$Uk6.141589@news6-win.server.ntlworld.com...

> Several of the biggy useful tools like gwindows, gnatcom, and possibly
> gtkada (with emphasis on the possibly) use gnat dependant features, which
> deters their use in other compilers.  It'd be interesting to see how much
> code is actually gnat dependant in those tools.





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 18:28       ` tmoran
  2002-05-25 21:52         ` Brian Rogoff
@ 2002-05-26  9:11         ` Preben Randhol
  2002-05-26 11:13           ` Simon Wright
  1 sibling, 1 reply; 62+ messages in thread
From: Preben Randhol @ 2002-05-26  9:11 UTC (permalink / raw)


On Sat, 25 May 2002 18:28:10 GMT, tmoran@acm.org wrote:
>> As for portability, you are not doing so badly
>> if you make something GNAT dependent,
>   I do think you should use your "Ada Core Technologies" signature when
> making a statement with such a clear financial impact.

Who should include this signature ? Please look at your newsreader so
that quoting gets right. There is no name associated with the text you
quoted.

Preben



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 23:24       ` Steve Doiel
@ 2002-05-26  9:21         ` Preben Randhol
  2002-05-28 13:58         ` Marin David Condic
  1 sibling, 0 replies; 62+ messages in thread
From: Preben Randhol @ 2002-05-26  9:21 UTC (permalink / raw)


On Sat, 25 May 2002 23:24:11 GMT, Steve Doiel wrote:
> 
> I visited the mill 5 years later.  The extension cord was still there.
> 
> Quick fixes often stay in place longer than intended.
> 
> Based on my experience I would say that I agree to disagree.

Well you are talking about a fix, we are not. To put in a:

   Put_Line ("Scroll_Value : " & Scroll_Value'Img);

in an application won't fix anything. It will only tell you the value
that you suspect may be wrong.

Besides if you write it like this you can just search through all your
sources for 'Img and easily find all those debug messages. If you do
it your way you will have to figure out which messages are debug
messages and which are not.

Other than that I agree with you that quick *fixes* can live on
longer than their life expectancy; keyword : Y2K.

Preben



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-26  9:11         ` Preben Randhol
@ 2002-05-26 11:13           ` Simon Wright
  2002-05-26 12:57             ` Preben Randhol
  0 siblings, 1 reply; 62+ messages in thread
From: Simon Wright @ 2002-05-26 11:13 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> writes:

> Who should include this signature ? Please look at your newsreader
> so that quoting gets right. There is no name associated with the
> text you quoted.

No, but "real" newsreaders should be able to thread; in Emacs it's
simply C-^ to get back to the posting that "this" posting is a reply
to.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-26 11:13           ` Simon Wright
@ 2002-05-26 12:57             ` Preben Randhol
  0 siblings, 0 replies; 62+ messages in thread
From: Preben Randhol @ 2002-05-26 12:57 UTC (permalink / raw)


On 26 May 2002 12:13:51 +0100, Simon Wright wrote:
> Preben Randhol <randhol+abuse@pvv.org> writes:
> 
>> Who should include this signature ? Please look at your newsreader
>> so that quoting gets right. There is no name associated with the
>> text you quoted.
> 
> No, but "real" newsreaders should be able to thread; in Emacs it's
> simply C-^ to get back to the posting that "this" posting is a reply
> to.

Huh? This is beside the point entirely. When I open comp.lang.ada my
newsreader threads all the post. But of course it doesn't show those I
have already read. That would be hopeless! I can choose to read old
messages, but why should I have to keep going back all the time to find
out who the poster is quoting?

Preben



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  7:36     ` Pascal Obry
@ 2002-05-28 13:14       ` Marin David Condic
  0 siblings, 0 replies; 62+ messages in thread
From: Marin David Condic @ 2002-05-28 13:14 UTC (permalink / raw)


There's nothing wrong with being compiler or platform dependent. It depends
on the project at hand. Many projects are sufficiently limited in scope that
there is no reason to go to extreme efforts to avoid compiler or platform
dependencies if doing so causes you to lose development leverage. (One
should always isolate this and document it as best as is possible so as to
maximize the ability ro reuse large chunks of the app, but if you get a lot
of leverage with some non-portable package, this is a good thing.)

Looking at the packages you reference, one could imagine the functionality
being the sort of thing that would be generally useful and good candidates
for some kind of more general compiler/platform independent specification.
I'd hope that Ada0x would add this leverage to the language in some manner
that means developers don't have to accept a vendor-specific solution in
order to gain the leverage.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Pascal Obry" <p.obry@wanadoo.fr> wrote in message
news:u3cwgadbo.fsf@wanadoo.fr...
>
> I agree with your point. But since many libraries are missing from the Ada
> standard it is hard to not do so. This was one goal for AWS (not using
> compiler specific packages)... But it would have been too much work to
> implement an equivalent for GNAT.Regexp, GNAT.Regpat, GNAT.Table,
> GNAT.Directory_Operations and GNAT.Calendar.Time_IO...
>
> Maybe this will change with the next Ada revision, but I don't think most
> hobbyist have the resources to buy all Ada compilers around and spend time
to
> check wether the program works with all compilers or to build all kind of
> helper libraries, you want to concentrate your effort on the main problem
(for
> AWS it was on the Web framework) especially since free time is quite
> expensive ;) And yes in this context GNAT is the compiler of choice...
> Building Open Source software with an Open Source compiler.
>






^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 17:38     ` Richard Riehle
  2002-05-25 18:37       ` tmoran
@ 2002-05-28 13:47       ` Marin David Condic
  2002-05-28 17:55       ` Stephen Leake
  2 siblings, 0 replies; 62+ messages in thread
From: Marin David Condic @ 2002-05-28 13:47 UTC (permalink / raw)


"Richard Riehle" <richard@adaworks.com> wrote in message
news:3CEFCC05.16C30A69@adaworks.com...
>
> When a Standard keeps a language from meeting its full potential, is that
> a good thing.  When we insist that no construct may be used that
> is not in the standard, is that not like saying we abhor innovation.   I

This sounds like a possible argument for there being a "second tier" of
"standard" for Ada - what I've been calling "Convention" for lack of any
better term. There's nothing wrong with innovations coming from only one
source but if it becomes clear that something is generally useful, there's a
big advantage to having that feature done the same way for all
implementations that decide to support it. (The advantage is for the end
user - its a disadvantage to the vendor. :-) That's why I'd like to see
things like libraries with a reference implementation that gain some
widespread adoption - we get language extension and leverage in a
semi-standard way without having to actually tinker with the ISO standard.


>
> So, it ACT deems it useful to add something as simply as attibutes to its
> compiler to accomplish things not pre-determined by the standard, so
> be it.    This could be one of the features that differentiates their
product
>
The language allows for vendor-specific attributes and pragmas, so in a
sense, utilizing this capability is "Standard". To my way of thinking,
having GNAT support its own extensions in this way is just fine - so long as
the user is aware that this is not portable across all compilers. If you
need portability, don't use these features or at least isolate them in some
manner so its easy to change where needed. If you really want portability,
you're going to have to do a lot more work than just worrying about
compiler-specific features and you *will* have to sacrifice capabilities. So
why sweat about it and try to eliminate all non-portabilities via
standardization?


>
> Let's not be the kind of people for who innovation lasts -- and lasts --
and
> lasts.
>
I vaguely remember a quote from someone to the effect that the greatest
innovators in a field eventually become the biggest roadblock further
innovation. Human nature I guess...

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  1 sibling, 1 reply; 62+ messages in thread
From: Marin David Condic @ 2002-05-28 13:58 UTC (permalink / raw)


IBM used to have a special announcement form called a "PTF" - the "Permanent
Temporary Fix". It was their way of letting users know that a temporary
patch had been turned into a permanent feature. Once you get a solution to a
problem in place and everything is back to working - even if the solution is
butt-ugly or dangerous - there is a strong incentive to leave it in place.
It pays to think carefully about the decisions we have to live with for a
long time rather than follow the advice of sports-shoe manufacturers and
"Just Do It..."

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Steve Doiel" <nospam_steved94@attbi.com> wrote in message
news:v2VH8.104660$UV4.200424@rwcrnsc54...
>
> Quick fixes often stay in place longer than intended.
>






^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 17:38     ` Richard Riehle
  2002-05-25 18:37       ` tmoran
  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
  2 siblings, 2 replies; 62+ messages in thread
From: Stephen Leake @ 2002-05-28 17:55 UTC (permalink / raw)


Richard Riehle <richard@adaworks.com> writes:

> <snip>    XP is a reaction to the Industrial
> Engineering model that has characterized so much software engineering
> practice.

Well, I find that Ada and XP go well together. 

As to whether having a Standard for Ada is a good thing, I think it
is. It means I can use GNAT to write and unit test code, then
recompile with DDCI for the 1750 target, with full confidence that the
language semantics is the same, and all of it is implemented.

One of the reasons I _don't_ like C++ is that I cannot do this with
confidence. On another current project, we're using Gnu C++ for unit
tests, and Green Hills for the target. We are _not_ allowed to use the
full C++ language, because neither compiler meets the standard.

> When a Standard keeps a language from meeting its full potential, is
> that a good thing. 

Standards do not limit languages; customers limit languages. That
includes me! 

GNAT is open source; if you want an Ada variant, go fund it! As Robert
keeps pointing out, that was one of the original motivations behind
producing an open source Ada compiler; people (mainly universities)
would be free to play around with the language. Yet no one has done it
yet in a serious way.

> <snip>
> So, it ACT deems it useful to add something as simply as attibutes to its
> compiler to accomplish things not pre-determined by the standard, so
> be it.

As long as there is a way to say "warn me if I deviate from the
standard", I agree with this (GNAT has such a switch, last I checked).

> This could be one of the features that differentiates their product
> from that of other compiler publishers.   

That's the Microsoft way. The true ACT way is to distinguish their
real product (which is support and service) by delivering better
quality. 

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25 11:02 ` Robert Dewar
@ 2002-05-28 18:09   ` Stephen Leake
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Leake @ 2002-05-28 18:09 UTC (permalink / raw)


dewar@gnat.com (Robert Dewar) writes:

> <snip>
> I actually am arguing very strongly for 3.2 to require 3.1 in the FSF
> environment for all sorts of reasons 

These days, when it is relatively easy to get a binary for gcc version
n-1 on most development boxes, this seems a reasonable course of
action.

> (it is interesting to note that those arguing against it are people
> who are typically outside the Ada community who are used to being
> able to compile C with any old compiler :-)

There have been times (in the not-so-distant past) when the only way I
could get a Gnu C compiler on a Sun box was to compile gcc with
the Sun C compiler. Then, the requirement "be able to compile Gnu gcc
with any old C compiler" was essential.

GNAT was never in that situation, and is in fact more widely available
than other Ada compilers, so the requirement "compile GNAT n with GNAT
n-1" is reasonable.

I don't think I'll every be tempted to compile GNAT for a 1750 host
with the DDCI compiler :).

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-28 17:55       ` Stephen Leake
@ 2002-05-28 18:35         ` Marin David Condic
  2002-05-28 21:42         ` Robert I. Eachus
  1 sibling, 0 replies; 62+ messages in thread
From: Marin David Condic @ 2002-05-28 18:35 UTC (permalink / raw)


Well, not exactly. Its not quite "Embrace & Extend" if the standard allows
implementation defined things to happen. Ada permits extensions via pragmas
and attributes that are compiler specific. Presumably different compilers
can then discover that they are looking at an attribute or pragma that they
don't understand/support and give you an intelligent message about it. Also,
the language would allow for non-standard syntax & semantics so long at the
compiler can be put in a mode wherein it will compile "standard" Ada - which
is something GNAT does. So its O.K. for ACT to create product distinction by
adding non-standard things in a standard way. Other compiler developers are
similarly free to do so. I don't see how this hurts anything in the way
that, for example, Microsoft does by having a C++ compiler that won't
compile "standard" C++. At least with Ada you know what you can basically
count on having available in any compiler. That's a very different thing
than attempting to use "standard" C++ & discovering that the compiler says
"We know this ought to work, but we decided to do it *our* way instead, so
go rewrite your code..." The latter amounts to inventing a new language.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:u4rgsjgx4.fsf@gsfc.nasa.gov...
>
> > This could be one of the features that differentiates their product
> > from that of other compiler publishers.
>
> That's the Microsoft way. The true ACT way is to distinguish their
> real product (which is support and service) by delivering better
> quality.
>






^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-28 17:55       ` Stephen Leake
  2002-05-28 18:35         ` Marin David Condic
@ 2002-05-28 21:42         ` Robert I. Eachus
  1 sibling, 0 replies; 62+ messages in thread
From: Robert I. Eachus @ 2002-05-28 21:42 UTC (permalink / raw)


Stephen Leake wrote:

 
> GNAT is open source; if you want an Ada variant, go fund it! As Robert
> keeps pointing out, that was one of the original motivations behind
> producing an open source Ada compiler; people (mainly universities)
> would be free to play around with the language. Yet no one has done it
> yet in a serious way.


I have to disagree here.  I think that you will find that a lot of ACT 
customers have taken that approach.  However, a strong perception during 
both the Ada 83 and Ada95 standardization process was that Ada should be 
extensible in a natural way with attribute, pragmas, and packages.  And 
also that any of these that are generally useful, even if just in a 
specific doman, and are ready for standardization, belong in the standard.

I'd hate to have to try to count the GNAT features that were needed by a 
specific customer, added to GNAT, then migrated into the area of 
generally used.  Several of these attributes and pragmas are migrating 
into the standard, even if they officially have yet to do so, others 
actually made it into the Ada 95 standard before it was approved.

I think that this conservatism is a very good thing.  There are features 
(or mis-features depending on your point of view) that were added in Ada 
95, and as they became used a need for additional language features 
became obvious. These are usually first seen in GNAT, but quickly appear 
in the other Ada compilers.  If the need is there, once the ARG can 
determine what the best way to implement the functionality is, it 
migrates into all compilers fairly quickly.

So Ada really is a much more dynamic standard than people think, and 
today's Ada 95 is much better than the Ada 95 of 1995.  But since the 
perception is that, of course all these features are part of the 
standard and there is no fragmenting of the Ada language, a lot of 
people make the mistake of assuming that this innovation and evolution 
is not going on.  In practice it is, just slow enough--and compatibly 
enough--that users don't notice.


 




^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-28 13:58         ` Marin David Condic
@ 2002-05-29 11:13           ` Preben Randhol
  2002-06-28 18:25             ` pontius
  0 siblings, 1 reply; 62+ messages in thread
From: Preben Randhol @ 2002-05-29 11:13 UTC (permalink / raw)


On Tue, 28 May 2002 09:58:11 -0400, Marin David Condic wrote:
> IBM used to have a special announcement form called a "PTF" - the
> "Permanent Temporary Fix". It was their way of letting users know that

hahahahahahahahaha 

Hilarious!

Preben



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-25  2:47 Ada -vs- GNAT Steve Doiel
                   ` (6 preceding siblings ...)
  2002-05-25 11:09 ` Robert Dewar
@ 2002-06-07 22:39 ` Randy Brukardt
  2002-06-08 12:14   ` Robert Dewar
  7 siblings, 1 reply; 62+ messages in thread
From: Randy Brukardt @ 2002-06-07 22:39 UTC (permalink / raw)


Steve Doiel wrote in message ...
>I've been using Ada for a several years now.  In my opinion one of the
>greatest strengths of the language is in its portability.  I find it
>reassuring that different vendors distribute the same reference manual
for
>the language.
>
>Recently I did some work with XML/Ada and found a few pieces code
dependent
>on the GNAT specific attributes 'img and 'unrestricted_access.  I was
able
>to make the code work with ObjectAda (and any other Ada compiler) by
making
>a few small changes to the sources.
>
>Personally I find the introduction of attributes and pragmas that are
not
>essential to be undesirable.


I agree. GNAT does provide a help, though, with the restrictions
pragmas:

    pragma Restrictions (No_Implementation_Pragmas);

and

    pragma Restrictions (No_Implementation_Attributes);

These are likely to be in the next version of Ada (see AI-257:
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00257.TXT ).

     Randy Brukardt.









^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-06-07 22:39 ` Randy Brukardt
@ 2002-06-08 12:14   ` Robert Dewar
  2002-06-08 19:37     ` SteveD
  2002-06-09 18:06     ` Richard Riehle
  0 siblings, 2 replies; 62+ messages in thread
From: Robert Dewar @ 2002-06-08 12:14 UTC (permalink / raw)


"Randy Brukardt" <randy@rrsoftware.com> wrote in message news:<ug2dgt3dbimqab@corp.supernews.com>...
> >Personally I find the introduction of attributes and pragmas that are
> >notessential to be undesirable.
> 
> 
> I agree

Everyone agrees!

What people differ on is the definition of essential. We are in the business
of meeting our customers needs. If there is a customer who needs a new feature,
and if the feature makes sense, and if it is generally useful, then we see it
as essential :-)

Robert Dewar
Ada Core Technologies



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-06-08 12:14   ` Robert Dewar
@ 2002-06-08 19:37     ` SteveD
  2002-06-09 12:13       ` Robert Dewar
  2002-06-09 18:05       ` Robert Dewar
  2002-06-09 18:06     ` Richard Riehle
  1 sibling, 2 replies; 62+ messages in thread
From: SteveD @ 2002-06-08 19:37 UTC (permalink / raw)


"Robert Dewar" <dewar@gnat.com> wrote in message
news:5ee5b646.0206080414.67b7ab3b@posting.google.com...
> "Randy Brukardt" <randy@rrsoftware.com> wrote in message
news:<ug2dgt3dbimqab@corp.supernews.com>...
> > >Personally I find the introduction of attributes and pragmas that are
> > >notessential to be undesirable.
> >
> >
> > I agree
>
> Everyone agrees!
>
> What people differ on is the definition of essential. We are in the
business
> of meeting our customers needs. If there is a customer who needs a new
feature,
> and if the feature makes sense, and if it is generally useful, then we see
it
> as essential :-)

I agree with this for most of the gnat specific attributes.  But find the
"img" attribute hard to justify.  Usually being terse is not a goal in Ada.

SteveD

> Robert Dewar
> Ada Core Technologies





^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  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
  1 sibling, 1 reply; 62+ messages in thread
From: Robert Dewar @ 2002-06-09 12:13 UTC (permalink / raw)


"SteveD" <nospam_steved94@attbi.com> wrote in message news:<x1tM8.144976$ux5.185878@rwcrnsc51.ops.asp.att.net>...

> I agree with this for most of the gnat specific attributes.  But find the
> "img" attribute hard to justify.  Usually being terse is not a goal in Ada.

The 'Img attribute is intended solely for debugging purposes. It is poor
style to use it in any other context. One thing to realize about 'Img is
that it is only partially implemented according to its original spec, since
the intention is that it be usable for composite objects.



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-06-08 19:37     ` SteveD
  2002-06-09 12:13       ` Robert Dewar
@ 2002-06-09 18:05       ` Robert Dewar
  1 sibling, 0 replies; 62+ messages in thread
From: Robert Dewar @ 2002-06-09 18:05 UTC (permalink / raw)


"SteveD" <nospam_steved94@attbi.com> wrote in message news:<x1tM8.144976$ux5.185878@rwcrnsc51.ops.asp.att.net>...
> I agree with this for most of the gnat specific 
> attributes.  But find the "img" attribute hard to
> justify.  Usually being terse is not a goal in Ada.

One comment on the terseness issue here is that when it
comes to attribute names, the design of the language
favors short abbreviations (pos, val, max, min etc)



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-06-08 12:14   ` Robert Dewar
  2002-06-08 19:37     ` SteveD
@ 2002-06-09 18:06     ` Richard Riehle
  2002-06-10 21:22       ` Robert A Duff
  1 sibling, 1 reply; 62+ messages in thread
From: Richard Riehle @ 2002-06-09 18:06 UTC (permalink / raw)


Robert Dewar wrote:

> What people differ on is the definition of essential. We are in the business
> of meeting our customers needs. If there is a customer who needs a new feature,
> and if the feature makes sense, and if it is generally useful, then we see it
> as essential :-)

A long time ago, in a far away place called Data Processing Land,  we had
languages such as COBOL, and compiler publishers addressed specific
user and platform needs by adding new reserved words and other features
to the language.    ACT appears to be taking a more responsible approach
by 1)  not adding new features to the language,  2) tailoring their compiler
through the use of pragmas and attributes as authorized by the ALRM, and
3) making it possible to avoid these additions by configuration pragmas.
This seems pretty reasonable to me, and I am, as you all know, a pretty
unreasonable person.

Richard Riehle




^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-06-09 18:06     ` Richard Riehle
@ 2002-06-10 21:22       ` Robert A Duff
  0 siblings, 0 replies; 62+ messages in thread
From: Robert A Duff @ 2002-06-10 21:22 UTC (permalink / raw)


Richard Riehle <richard@adaworks.com> writes:

> A long time ago, in a far away place called Data Processing Land,  we had
> languages such as COBOL, and compiler publishers addressed specific
> user and platform needs by adding new reserved words and other features
> to the language.    ACT appears to be taking a more responsible approach
> by 1)  not adding new features to the language,  2) tailoring their compiler
> through the use of pragmas and attributes as authorized by the ALRM, and
> 3) making it possible to avoid these additions by configuration pragmas.
> This seems pretty reasonable to me, and I am, as you all know, a pretty
> unreasonable person.

It seems to me that (3) is the key point.  It doesn't really matter very
much whether language extensions are new syntax or new pragmas and
attributes.  If you use compiler-specific functionality, you damage your
portability either way.  The fact that the RM authorizes certain kinds
of language extensions doesn't change this fact.

For example, if you make heavy use of 'Unrestricted_Access to make
downward closures, you're going to have a lot of trouble porting to a
compiler that doesn't support 'Unrestricted_Access.  If the same feature
were provided with syntax, it would be no harder and no easier.
The important thing is that you can run the compiler in a mode where it
forbids such extensions.

- Bob



^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-06-09 12:13       ` Robert Dewar
@ 2002-06-12 17:07         ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 62+ messages in thread
From: Warren W. Gay VE3WWG @ 2002-06-12 17:07 UTC (permalink / raw)


Robert Dewar wrote:

> "SteveD" <nospam_steved94@attbi.com> wrote in message news:<x1tM8.144976$ux5.185878@rwcrnsc51.ops.asp.att.net>...
> 
>>I agree with this for most of the gnat specific attributes.  But find the
>>"img" attribute hard to justify.  Usually being terse is not a goal in Ada.
> 
> The 'Img attribute is intended solely for debugging purposes. It is poor
> style to use it in any other context. One thing to realize about 'Img is
> that it is only partially implemented according to its original spec, since
> the intention is that it be usable for composite objects.


For debugging purposes, I have many times pined for that
'Img support of "composite objects". ;-)

Warren.






^ permalink raw reply	[flat|nested] 62+ messages in thread

* Re: Ada -vs- GNAT
  2002-05-29 11:13           ` Preben Randhol
@ 2002-06-28 18:25             ` pontius
  0 siblings, 0 replies; 62+ messages in thread
From: pontius @ 2002-06-28 18:25 UTC (permalink / raw)


In article <slrnaf9dvo.u9.randhol+abuse@kiuk0156.chembio.ntnu.no>,
	Preben Randhol <randhol+abuse@pvv.org> writes:
> On Tue, 28 May 2002 09:58:11 -0400, Marin David Condic wrote:
>> IBM used to have a special announcement form called a "PTF" - the
>> "Permanent Temporary Fix". It was their way of letting users know that
>
> hahahahahahahahaha
>
> Hilarious!
>
So THAT'S what PTF stands for. Never dealt with them personally, though
sometimes software I've used needed them applied.

Dale Pontius
(NOT speaking for IBM)



^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2002-06-28 18:25 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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