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.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!igor!yoda!jls From: jls@yoda.Rational.COM (Jim Showalter) Newsgroups: comp.lang.ada Subject: Re: procedural variables Message-ID: Date: 18 Feb 91 00:28:59 GMT References: <9102110959.aa23851@PARIS.ICS.UCI.EDU> <662@esosun.UUCP> <24590@neptune.inf.ethz.ch> <2834@cod.NOSC.MIL> Sender: news@Rational.COM List-Id: >>Could anybody explain what the rationale for not including procedural >>variables in Ada is (I have heard it has been discussed and dismissed again >>in the past few years) ? They were deemed unsafe, because it is possible to get all fouled up with lifetime issues. Consider this example: procedure outer (...) is type some_procedure_type is ... foo : some_procedure_type; procedure middle (...) is procedure short_lifetime (...) is -- MATCHES some_procedure_type begin ... end short_lifetime; begin foo := short_lifetime; end middle; begin middle (...); foo; -- WHAT SHOULD HAPPEN HERE? end outer; Anyway, 9x looks like it will have these puppies. How they get around problems like the above I don't know--I suggest raising program_error whenever it occurs. -- ***** DISCLAIMER: The opinions expressed herein are my own. Duh. Like you'd ever be able to find a company (or, for that matter, very many people) with opinions like mine. -- "When I want your opinion, I'll beat it out of you."