comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: Freeing Pointers to classwide types
Date: 1998/10/01
Date: 1998-10-01T00:00:00+00:00	[thread overview]
Message-ID: <6v06o6$n4i$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 36131a1b.34896409@SantaClara01.news.InterNex.Net

In article <36131a1b.34896409@SantaClara01.news.InterNex.Net>,
  tmoran@bix.com (Tom Moran) wrote:
> >But it is a trivial excercise to rewrite this so that it uses an Ada
> >allocator
> Without using Unchecked_Conversion and Unchecked_Deallocation?

And why on earth would you try to avoid these? You can write perfectly
portable code using these routines if you know what you are doing. It
is particularly odd to complain about the use of Unchecked_Deallocation
in a routine devoted to storage allocation and deallocation, and there
is nothing at all non-portable about the kind of use of UD you would
use here. As for UC, sure you have to be careful how you use it, and
from a formal point of view, it is probably true that the RM will not
guarantee that what you would write would work, but that should not
deter you from writing perfectly portable code (in practice) using UC.

It is always surprising when people are absolutely set against UC, and
the result is that people write code in C that is exactly equivalent.

I remember one comparison of Ada vs C presentation I saw for an AI
application. The C was much faster. Virtually 100% of the difference
was in allocation. I asked what was going on

"Do you use malloc?"

"Oh no, that's far too slow, we wrote our own allocator in C"

"Well why didn't you do the same in Ada"

"Because it wouldn't have been portable"

"But your C is not portable in a formal sense anyway"

"Well it works on three different machines!!!"

Sigh!

Ada folks are good at shooting themselves in the foot, and it isn't even
the language that's doing it :-)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1998-10-01  0:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-24  0:00 Freeing Pointers to classwide types joecool
1998-09-25  0:00 ` alan walkington
1998-09-25  0:00 ` Tom Moran
1998-09-25  0:00   ` Bob Fletcher
1998-09-25  0:00     ` dennison
1998-09-25  0:00     ` Samuel Tardieu
1998-10-09  0:00     ` Matthew Heaney
1998-10-12  0:00       ` Mats Weber
1998-10-12  0:00         ` Pat Rogers
1998-09-25  0:00   ` dewarr
1998-09-25  0:00     ` Tom Moran
1998-09-25  0:00       ` dewarr
1998-09-26  0:00     ` Tom Moran
1998-09-26  0:00       ` dewarr
1998-09-26  0:00         ` Tom Moran
1998-09-27  0:00           ` dewarr
1998-09-27  0:00             ` Tom Moran
1998-09-28  0:00               ` dewarr
1998-09-28  0:00                 ` Tom Moran
1998-09-28  0:00                   ` dewarr
1998-09-28  0:00                     ` Richard D Riehle
1998-09-28  0:00                       ` Pat Rogers
1998-09-29  0:00                       ` dewarr
1998-09-28  0:00                   ` dewarr
1998-09-28  0:00                     ` Tom Moran
1998-09-28  0:00                       ` Pat Rogers
1998-09-28  0:00                         ` Tom Moran
1998-09-28  0:00                           ` Pat Rogers
1998-09-29  0:00                           ` dewarr
1998-09-29  0:00                             ` Tom Moran
1998-09-30  0:00                               ` Tom Moran
1998-10-01  0:00                                 ` dewar
1998-10-01  0:00                                   ` Tom Moran
1998-10-01  0:00                                     ` dewarr
1998-10-01  0:00                                       ` Tom Moran
1998-10-01  0:00                                     ` dewarr [this message]
1998-10-01  0:00                                     ` Samuel Tardieu
1998-10-01  0:00                                       ` Tom Moran
1998-10-01  0:00                                         ` Tucker Taft
1998-10-01  0:00                                           ` Tom Moran
1998-10-02  0:00                                           ` dewarr
1998-10-02  0:00                                             ` Larry Kilgallen
1998-10-02  0:00                                               ` dewarr
1998-10-02  0:00                                           ` dennison
1998-10-02  0:00                                             ` dewarr
1998-10-01  0:00                                         ` dennison
1998-10-02  0:00                                         ` dewarr
1998-10-09  0:00                                           ` Matthew Heaney
1998-10-09  0:00                                             ` dennison
1998-10-09  0:00                                               ` Matthew Heaney
1998-09-28  0:00                       ` Tom Moran
1998-09-28  0:00                         ` Brian Rogoff
1998-10-09  0:00           ` Matthew Heaney
1998-10-09  0:00   ` Matthew Heaney
1998-09-26  0:00 ` Simon Wright
1998-10-09  0:00 ` Matthew Heaney
1998-10-09  0:00   ` Niklas Holsti
1998-10-10  0:00     ` Matthew Heaney
1998-10-11  0:00       ` Niklas Holsti
1998-10-11  0:00         ` Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
1998-09-25  0:00 bpr5549
replies disabled

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