From: "Steve" <nospam_steved94@comcast.net>
Subject: Re: Why was it done this way ?
Date: Wed, 26 Oct 2005 19:46:54 -0700
Date: 2005-10-26T19:46:54-07:00 [thread overview]
Message-ID: <ZMSdncpXYeMKov3eRVn-pw@comcast.com> (raw)
In-Reply-To: %DV7f.13378$rE2.2085@fe10.lga
"Heimlich Manure" <spam@goes.here> wrote in message
news:%DV7f.13378$rE2.2085@fe10.lga...
> Hello respectable group,
>
> This may be a silly question but I'm sure there was reasoning behind
> allowing such :
>
> with Ada.Text_IO;
> use Ada.Text_IO;
>
> procedure My_Example is
> task type T1;
> task type T2;
>
> task body T1 is
> begin
> Put_Line("Instantiating T2 from T1");
> declare
> T_2_2 : T2;
> begin
> null;
> end;
> end T1;
>
> task body T2 is
> begin
> Put_Line("Instantiating T1 from T2");
> declare
> T_1_1 : T1;
> begin
> null;
> end;
> end T2;
>
> T_1 : T2;
> begin
> null;
> end My_Example;
>
> Question is, why is this legit ?
>
Why would it not be legit?
It looks kind of like infinite recursion involving tasks to me.
Probably not something you would want to do, but expecting a lot for the
compiler to detect the condition. If the compiler did detect the condition,
the most I would hope for is a warning... after all it may have been the
intent.
Steve
(The Duck)
next prev parent reply other threads:[~2005-10-27 2:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-27 1:00 Why was it done this way ? Heimlich Manure
2005-10-27 2:30 ` jimmaureenrogers
2005-10-27 2:39 ` Heimlich Manure
2005-10-27 6:09 ` Jeffrey R. Carter
2005-10-27 6:46 ` Jean-Pierre Rosen
2005-10-27 2:46 ` Steve [this message]
2005-10-27 9:39 ` Georg Bauhaus
2005-10-27 15:07 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox