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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99ab4bb580fc34cd X-Google-Attributes: gid103376,public From: rogoff@sccm.Stanford.EDU (Brian Rogoff) Subject: Re: Q: access to subprogram Date: 1996/07/26 Message-ID: #1/1 X-Deja-AN: 170289884 references: <4rb9dp$qe6@news1.delphi.com> organization: /u/rogoff/.organization reply-to: rogoff@sccm.stanford.edu newsgroups: comp.lang.ada Date: 1996-07-26T00:00:00+00:00 List-Id: bobduff@world.std.com (Robert A Duff) writes: Brian Rogoff wrote: >Anecdotal evidence, but useful. Anecdotal is all you ever get in this business. ;-) Correct. But by collecting this anecdotal evidence and analyzing it we can hopefully get some idea of what we're doing :-). > Ada's generics can do *almost* everything that Pascal can do. They > can't recurse, in Ada, like they can in Pascal. (I needed that once.) > And they're verbose, as I said. > >Do you feel that they are the right solution though? No. They work in many cases, but they're not the best solution. That's my feeling too, although when I thought about it more I couldn't really rationalize why I disliked generics so much for this problem and yet like the use of null bodied generic formal package parameters for signatures. Maybe in a few days the generic approach won't seem so bad. >Was this the "why are they any better than wrapping up the environment and >func in a tagged type" question? Yes. Not just "why are they better", but "why are the a LOT better" (which is the claim I often hear). I think that you posted that you like Smalltalk blocks a lot, which are essentially just anonymous closures, right? I think the beauty of this construct is that you can implement lots of features cleanly in terms of it, like control structures. Also the implementation of closures on objects seems heavy/verbose to me. I think in a language like Smalltalk, which already has GC, that upward funargs and objects are (a LOT) better than objects alone. On the other hand, if you are asking if they are so much better than explicitly managing the heap that Ada should adopt GC :-), I'd say no. -- Brian