comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Q: on redefinition of "=
Date: 1996/04/02
Date: 1996-04-02T00:00:00+00:00	[thread overview]
Message-ID: <dewar.828449834@schonberg> (raw)
In-Reply-To: 3160C33B.1FE2@mcs.com

Mike said

"Robert Dewar wrote:
>
> "Anyway, in the design I'm currently working with all types must
> support automatic initialization and finalization (and thus are
> controlled types)"
>
> This sounds truly awful. I wonder if whoever devised this approach has
> any idea how much overhead this approach introduces, not to mention
> complexity in the generated code.

==========
Would this be the equivalent of constructors/destructors in C++? I
apologize for not seeing the problems. What is going on that would make
this such a horrible approach?"

Mostly Ada is a low level language in the sense that what you write is
pretty closely tied to the semantics of the machine, so you have soe
reasonable idea of the underlying execution semantics.

Controlled types (or destructors in C++) are an exception. THe use of 
either generates a lot of extra baggage in time and space. They are
useful features when used where necessary or really useful, but
the idea of making ALL types controlled is to me a design idea
that has run completely amok.

Mike, if you are using GNAT, try using the -gnatdg switch on your code
to get some idea of what you are generating. Certainly GNAT does not
do an optimal job of handling finalization, that is an area in which
we have improvements to make, but there is no way of doing finalization
free!





  reply	other threads:[~1996-04-02  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-30  0:00 Q: on redefinition of "= david scott gibson
1996-04-01  0:00 ` Tucker Taft
1996-04-01  0:00   ` david scott gibson
1996-04-01  0:00     ` Robert Dewar
1996-04-02  0:00       ` Mike Young
1996-04-02  0:00         ` Robert Dewar [this message]
1996-04-02  0:00           ` david scott gibson
1996-04-02  0:00             ` Robert A Duff
1996-04-02  0:00               ` david scott gibson
1996-04-02  0:00                 ` Robert A Duff
1996-04-02  0:00                   ` david scott gibson
1996-04-02  0:00             ` Robert Dewar
1996-04-03  0:00             ` Tucker Taft
1996-04-01  0:00 ` Robert A Duff
1996-04-01  0:00   ` david scott gibson
1996-04-01  0:00     ` Robert A Duff
replies disabled

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