comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Abnormal objects - how they can become normal again?
Date: Wed, 21 Dec 2005 14:01:09 +0100
Date: 2005-12-21T14:01:09+01:00	[thread overview]
Message-ID: <dobjmk$ht4$1@sunnews.cern.ch> (raw)

Hi,

If an object is abnormal, it can become normal again after a successful 
completion of an assignment to this object.
The problem is that during the assignment, the finalization of the 
(still abnormal) object should take place. How it can happen, if at the 
same time evaluation of the abnormal object is erroneous?

 From the programmers perspective, there are two cases:
- "simple" types (like Integer), with basically empty finalizers; 
nothing bad can happen there, so assignment to an uninitialized variable 
is harmless,
- controlled types; but there, finalizers come bundled with initializers 
so that there's no way to make an object abnormal by just forgetting to 
initialize it - the only way to make an object abnormal would be to 
abort a previous assignment, which is a no-no anyway.

I understand the issue from the implementation point of view, but the 
wording in AARM (13.9.1) seems to be a bit fragile. From the 
language-lawyer's point of view: how to assign to an abnormal object, if 
its evaluation is erroneous?
Is the object evaluated before it's assigned to or as part of the 
assignment process (especially finalization)?


-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/



             reply	other threads:[~2005-12-21 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-21 13:01 Maciej Sobczak [this message]
2005-12-21 21:47 ` Abnormal objects - how they can become normal again? Robert A Duff
2005-12-22 10:50   ` Alex R. Mosteo
2005-12-22 15:57     ` 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