comp.lang.ada
 help / color / mirror / Atom feed
From: Charles Hixson <charleshixsn@earthlink.net>
Subject: Re: Why C++ is successful
Date: 1998/07/31
Date: 1998-07-31T00:00:00+00:00	[thread overview]
Message-ID: <35C20808.18ACCBD2@earthlink.net> (raw)
In-Reply-To: EACHUS.98Jul30153757@spectre.mitre.org

Yes, I know what the current Ada spec is on this.  I was also informed
(forget which book) that routines in library units are not guaranteed to
ever clean themselves up (during the life of the program).  Annoying. 
And, yes, I know that those compilers that host themselves on JVM's make
use of the embedded garbage collector, but there doesn't seem to be any
syntax, and certainly no standard syntax, to control it.  At least Java
lets you ASK the gc to start.  It doesn't have to do it, but you can
ask.
Basically, I'm very attracted to Ada95.  But there are these few little
problems:  no standard screen controls (need to use some other standard
language for that, I guess).  No standard gc (yes, I do need to look
into descendants of controlled, but the examples that I've seen so far
haven't left me feeling optomistic -- basically, if I have a structure
with multiple pointers, say a balanced tree with some cursors, there
doesn't seem to be any safe way to determine when I can free the node,
without a WHOLE LOT of hand waving (sentinals, freeable storage lists,
synchronization flags, etc.), so how do I balance the tree?  I know in
Java that there's a huge amount of *stuff* going on in the background,
and it would be v. nice to eliminate this on structures that don't need
it.  Especially on arrays, etc., of "homogenous type".  But I wonder if
the gain of eliminating the overhead (and for getting those VERY USEFUL
type checks and range types) pays for the cost of user maintained
dynamic types.  This is the second time I have devoted a month or two to
Ada95, because it seems to be SO desireable.  Then I hit one of these
bottlenecks, estimate the amount of time it will take to implement the
feature I'm looking at, and back off again.
But if a standard approach were defined, then even if the particular
compiler that I was using didn't implement it (i.e., optional annex), at
least I would know what syntax my solution should use, so as to be
maximally portable.

I don't want to build in storage leaks, assuming a garbage collector,
when most implementations don't have one.

Robert I. Eachus wrote:
> 
> In article <35BF49E8.136D75C2@earthling.net> Charles Hixson <charleshixson@earthling.net> writes:
> 
>  > But what Ada REALLY needs is a good garbage collection mechanism.  And
>  > saying "Do it by hand" doesn't qualify as good!
> 
>    The Ada philosophy is to give the programmer the tools he needs and
> to allow him the freedom to create types (classes) that do what is
> required for that type.  Of course there are also predefined types and
> where appropriate there are directions given to the compiler writers
> about those types:
	/* snip */ 
> do need to put in some storage management code.  But with Ada 95, the
> most I have ever had to do was about one page of code.  (Create a type
> descended from Controlled that cleans itself up when no longer visible
> by calling Unchecked_Deallocation.  These objects are often used for
> communication between tasks where a simple protected type won't
> do. However, I'd say that 90% of such cases all you have to do is use
> Unbounded_Strings.)
> 
>     I'll post a very useful example to comp.lang.ada soon.
> --
> 
>                                         Robert I. Eachus
> 
> with Standard_Disclaimer;
> use  Standard_Disclaimer;
> function Message (Text: in Clever_Ideas) return Better_Ideas is...




  reply	other threads:[~1998-07-31  0:00 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <35AE4621.2EBC7F6A@eiffel.com>
     [not found] ` <7hAr1.3249$9E2.2188373@news.teleport.com>
     [not found]   ` <35AF70B9.61C5BF88@oma.com>
     [not found]     ` <N.19980718.jjru@sisyphus.demon.co.uk>
     [not found]       ` <35B32BDC.5C2C@dmu.ac.uk>
     [not found]         ` <N.19980720.ulio@sisyphus.demon.co.uk>
     [not found]           ` <35B47EAD.3AA9@dmu.ac.uk>
     [not found]             ` <N.19980722.gwka@sisyphus.demon.co.uk>
     [not found]               ` <35B60AC4.D703E836@hso.link.com>
1998-07-25  0:00                 ` Bug story Fergus Henderson
1998-07-29  0:00                   ` Robert I. Eachus
     [not found] ` <6p83vj$657$1@news.intellistor.com>
     [not found]   ` <35B79E7D.6068DCDF@eiffel.com>
     [not found]     ` <6pg7fg$qhi$1@news.interlog.com>
     [not found]       ` <901533851.20058.0.nnrp-04.9e980ba3@news.demon.co.uk>
     [not found]         ` <35be2a94.57352308@netnews.msn.com>
1998-07-28  0:00           ` Why C++ is successful Rakesh Malhotra
1998-07-29  0:00             ` Dave Martin
1998-07-29  0:00               ` Rakesh Malhotra
1998-07-29  0:00               ` John McCabe
1998-07-29  0:00                 ` nabbasi
1998-08-08  0:00                   ` Michael Young
1998-07-29  0:00               ` Jean-Pierre Rosen
1998-07-29  0:00               ` Pat Rogers
1998-07-29  0:00                 ` Brian Rogoff
1998-07-29  0:00                   ` John McCabe
1998-07-29  0:00                   ` Charles Hixson
1998-07-29  0:00                     ` falis
1998-07-30  0:00                     ` Robert I. Eachus
1998-07-31  0:00                       ` Charles Hixson [this message]
1998-08-01  0:00                     ` Jay Martin
1998-08-02  0:00                       ` Robert Dewar
1998-08-01  0:00                         ` Jay Martin
1998-08-02  0:00                           ` Matthew Heaney
1998-08-02  0:00                             ` Jay Martin
1998-08-02  0:00                               ` Matthew Heaney
1998-08-02  0:00                           ` Matthew Heaney
1998-08-02  0:00                             ` Lars Farm
1998-08-02  0:00                               ` Matthew Heaney
1998-08-02  0:00                                 ` Lars Farm
1998-08-10  0:00                               ` Robert I. Eachus
1998-07-29  0:00                 ` Juan Carlos Gil Montoro
1998-07-29  0:00                   ` Pat Rogers
1998-07-29  0:00                     ` Jay Martin
1998-07-30  0:00                       ` dennison
1998-07-30  0:00                     ` Ell
1998-07-29  0:00                       ` Pat Rogers
1998-07-30  0:00                         ` Ell
1998-07-30  0:00                         ` Ell
1998-07-29  0:00                       ` Larry Elmore
1998-07-30  0:00                         ` Jeffrey C. Dege
1998-08-01  0:00                           ` Robert Dewar
1998-07-30  0:00                         ` Ell
1998-07-29  0:00             ` Tom Moran
1998-07-29  0:00               ` Ell
1998-07-29  0:00                 ` Tom Moran
1998-07-29  0:00                   ` Ell
1998-08-06  0:00 Robert Dewar
1998-08-06  0:00 ` William Clodius
1998-08-06  0:00 ` Martin Dowie
  -- strict thread matches above, loose matches on Subject: below --
1998-08-06  0:00 Robert Dewar
1998-08-07  0:00 ` Jason Stokes
1998-08-08  0:00   ` Robert Dewar
1998-08-10  0:00     ` Robert I. Eachus
1998-08-11  0:00     ` n
1998-08-14  0:00       ` Robert Dewar
     [not found]         ` <35D455AC.9225EAA7@hercii.mar.lmco.com>
1998-08-14  0:00           ` Robert L. Spooner
1998-08-10  0:00   ` Darren New
1998-08-07  0:00 ` harald.mueller
1998-08-07  0:00   ` Brian Rogoff
1998-08-07  0:00     ` Timothy Welch
1998-08-08  0:00       ` Robert Dewar
1998-08-08  0:00         ` Phlip
1998-08-08  0:00         ` Larry Elmore
1998-08-08  0:00         ` Jeffrey C. Dege
1998-08-08  0:00           ` Patrick Logan
1998-08-10  0:00           ` Laurent GUERBY
1998-08-12  0:00             ` Andy Ward
1998-08-12  0:00               ` Matt Kennel
1998-08-14  0:00               ` Robert Dewar
1998-08-13  0:00                 ` nasser
1998-08-19  0:00                   ` Don Harrison
1998-08-14  0:00                 ` Ell
1998-08-17  0:00                   ` Robert I. Eachus
1998-08-17  0:00                     ` Patrick Logan
1998-08-18  0:00                       ` Samuel Tardieu
1998-08-14  0:00                 ` Jean-Pierre Rosen
1998-08-14  0:00                   ` Robert Martin
1998-08-16  0:00                     ` Robert Dewar
1998-08-16  0:00                       ` Robert Martin
1998-08-16  0:00                       ` Rick Smith
1998-08-17  0:00                         ` Robert Dewar
1998-08-17  0:00                           ` Rick Smith
1998-08-15  0:00                   ` Patrick Doyle
1998-08-15  0:00                     ` Jean-Pierre Rosen
1998-08-16  0:00                       ` Robert Dewar
1998-08-17  0:00                         ` Jean-Pierre Rosen
1998-08-16  0:00                       ` Patrick Doyle
1998-08-15  0:00                   ` Mr Ada
1998-08-16  0:00                     ` Robert Dewar
1998-08-16  0:00                   ` Robert Dewar
1998-08-14  0:00                 ` Patrick Doyle
1998-08-16  0:00                   ` Robert Dewar
1998-08-16  0:00                     ` Patrick Doyle
1998-08-18  0:00                     ` Martin Tom Brown
1998-08-16  0:00                   ` Robert Dewar
1998-08-16  0:00                     ` Patrick Doyle
1998-08-11  0:00           ` stilcom
1998-08-12  0:00             ` Jeffrey C. Dege
1998-08-12  0:00               ` Andrew Koenig
1998-08-14  0:00               ` Stefan Tilkov
1998-08-08  0:00       ` Dale Stanbrough
1998-08-07  0:00   ` Robert Dewar
1998-08-08  0:00     ` Patrick Logan
1998-08-22  0:00 dewar
replies disabled

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