From: jls@yoda.Rational.COM (Jim Showalter)
Subject: Re: procedural variables
Date: 18 Feb 91 00:28:59 GMT [thread overview]
Message-ID: <jls.666836939@yoda> (raw)
In-Reply-To: 2834@cod.NOSC.MIL
>>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."
next prev parent reply other threads:[~1991-02-18 0:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-02-11 18:04 procedural variables J o s e D u a r t e ! ! !
1991-02-11 21:45 ` Howard Turner
1991-02-12 12:32 ` Matthias Ulrich Neeracher
1991-02-15 18:32 ` Charles H. Sampson
1991-02-16 13:12 ` madmats
1991-02-19 20:33 ` stephen edwards
1991-02-20 21:02 ` Jim Showalter
1991-02-18 0:28 ` Jim Showalter [this message]
1991-02-12 23:04 ` (George C. Harrison) Norfolk State University
-- strict thread matches above, loose matches on Subject: below --
1991-02-14 19:08 stt
1991-02-24 21:18 Erland Sommarskog
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox