comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: meaning of "current instance"
Date: 1999/11/12
Date: 1999-11-12T00:00:00+00:00	[thread overview]
Message-ID: <mG%W3.5997$dp.134843@typhoon-sf.snfc21.pbi.net> (raw)
In-Reply-To: 382c0d0f_1@news1.prserv.net

>So in your example above, it may be OK for Init to refer to component I,
>because that component has definitely been elaborated.  But you're
>really treading on thin ice here...
  Is it legal, or is it not?  The only mention of "current instance"
of a type that I see in the LRM index is to 8.6(17), which leaves me
guessing that the usual elaboration order rules apply, even though
things can be written that are normally un-writeable.
  If the order of components in a record declaration is changed, it
usually doesn't break things, or at least the compiler will point out
that you are using something before it exists.  A usage of "current
instance" presumably is a red flag to a maintenance programmer that
re-ordering is treading on thin ice.

>Type T probably needs to be limited.  (Did this even compile?)
 It compiled on two compilers, giving the results mentioned
previously.  Cohen's book only discusses limited T, but I don't see
anything in 8.6(17) that says limited, and these two compilers don't
require limited.

As I read LRM 8.6(17), T.I should be just as allowable as T'access,
but compilers don't seem to agree.  Where is this mentioned?

>You have to be careful about concurrency issues.
Not in a little "junk" program testing "current instance".  Stepper
was intended as a standin for anything with a side effect - random
numbers, IO, etc.  I hope anybody writing code that might be used
concurrently would use the appropriate protections, but I don't think
a little test program counts.




  reply	other threads:[~1999-11-12  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-11  0:00 meaning of "current instance" Matthew Heaney
1999-11-11  0:00 ` Robert A Duff
1999-11-11  0:00   ` Matthew Heaney
1999-11-11  0:00     ` Tucker Taft
1999-11-15  0:00   ` Tucker Taft
1999-11-15  0:00     ` tmoran
1999-11-15  0:00       ` Tucker Taft
1999-11-11  0:00 ` tmoran
1999-11-11  0:00   ` Matthew Heaney
1999-11-12  0:00     ` tmoran
1999-11-11  0:00       ` Matthew Heaney
1999-11-12  0:00         ` tmoran
1999-11-12  0:00           ` Matthew Heaney
1999-11-12  0:00             ` tmoran [this message]
1999-11-12  0:00               ` Matthew Heaney
1999-11-13  0:00             ` Robert A Duff
1999-11-13  0:00           ` Nick Roberts
1999-11-13  0:00             ` Robert A Duff
1999-11-14  0:00               ` tmoran
1999-11-13  0:00                 ` Matthew Heaney
1999-11-15  0:00                   ` John English
1999-11-15  0:00                     ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox