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: davidk@os1.ifs (David Kristola) Subject: Re: Q: access to subprogram Date: 1996/07/30 Message-ID: <4tjqkc$87k@butch.lmsc.lockheed.com>#1/1 X-Deja-AN: 171036846 distribution: world references: organization: Sun Microsystems, Inc. reply-to: davidk@os1.ifs newsgroups: comp.lang.ada Date: 1996-07-30T00:00:00+00:00 List-Id: In article B9F@world.std.com, bobduff@world.std.com (Robert A Duff) writes: >In article <4t8rfo$g71@butch.lmsc.lockheed.com>, >David Kristola wrote: >>Maybe i am misunderstanding the meaning of "distributed overhead", but don't >>all shared generics have some? But anyway... > >I think you're misunderstanding "distrib overhead". "Feature X causes >distributed overhead" means that your program will have some overhead, >caused by the mere existence of feature X in the language, even if you >don't use feature X. If feature X is slow, that's just plain old >overhead, not "distributed overhead". Yes, i was confused. Thank you. [snip] >Distributed overhead is evil. [snip] >Suppose Call_Something were *outside* the generic, and saved F'Access in >a global variable. This is illegal, but we're arging about "what if >this were legal?" I should have used dot notation to indicate that Call_Something was outside the generic. I also should have used an access-to-subprogram type. I suppose there are still problems, considering that the generic instance could be temporary. Maybe by placing a pointer in the generic data block (actually, in every generic data block) and allocating (on the heap) generic body specific data during elaboration of the generic instance body (but deallocating is now a problem), and filling in the pointer to point to the additional information during the instance body elaboration.... I guess this is all a moot point (i hope i am using "moot" correctly, i skipped the big discussion on that topic :-). [snip] >Note that the workaround isn't so bad: declare F in the private part, >and then it's legal (and then the compiler knows about it at >instantiation time, and can generate the wrapper at that time). Now if i only had a job where i could use Ada95, i could use this ;). >- Bob david kristola Work: davidk@os1.ese.lmsc.lockheed.com Play: DJKristola@aol.com My suggestion for Lockheed Martin's next slogan: "Lockheed Martin, we make things that go BOOM!"