From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5992229ab824d8f7 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Q: on redefinition of "= Date: 1996/04/02 Message-ID: #1/1 X-Deja-AN: 145424805 references: <4jkj5sINN8d3@aleutian.cis.ohio-state.edu> <4jp05jINNqo6@snoopy.cis.ohio-state.edu> <3160C33B.1FE2@mcs.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-04-02T00:00:00+00:00 List-Id: 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!