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,2907a68906511623 X-Google-Attributes: gid103376,public From: Charles Hixson Subject: Re: Idea for Ada 200x: Arguments that are procedures Date: 1998/07/03 Message-ID: <359D41CE.D3976FA6@earthlink.net>#1/1 X-Deja-AN: 368501711 Content-Transfer-Encoding: 7bit References: <6nh9f0$66i@netline.jpl.nasa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Mandala Fluteworks Newsgroups: comp.lang.ada Date: 1998-07-03T00:00:00+00:00 List-Id: Van Snyder wrote: > > Procedures that are arguments are restricted in Ada because of the > possibility of copying the pointer to somewhere that has a longer > lifetime than the up-level environment of the procedure. > /* snip */ > to my deep-in-the-guts-of-the-system procedure as the actual argument. > I can't do this now, because the type might outlive the procedure, and > therefore a pointer to the procedure might outlive its up-level. > > -- > What fraction of Americans believe | Van Snyder > Wrestling is real and NASA is fake? | vsnyder@math.jpl.nasa.gov I find the lack of a decent garbage collector to be a MUCH more troublesome problem. This is especially so as data allocated in library units is not automatically freed during the program execution. On the other hand, it's VERY difficult to check that there are no dangling references, so Unchecked_DeAllocation always feels very dangerous. On the third hand, Java's "lets garbage collect EVERYTHING" seems excessive, and has GOT to be a part of what slows Java down. This seems to be the kind of thing with so many possibilities and internal dependancies that it is best dealt with by the compiler writer. And the memory leaks in various commercial applications demonstrates very clearly how important an issue it is (i.e., enough so that I prefer Java's approach to C++'s). A second, and distinctly less important proposal, would be some way of inserting common ancestors into a hierarchy, even it they needed to be inserted as fully abstract classes. Reorganizing the grouping of their concepts (maps to hierarchies) is one of the important things that people do, so I feel that the language should support it. People don't usually form a category until after they have collected several examples that could fit into it. And since programmers are people I expect that others also keep having to reorganize their classes as time passes.