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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,31f4d595a05ede7d,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Abnormal objects - how they can become normal again? Date: Wed, 21 Dec 2005 14:01:09 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1135170068 18340 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Red Hat/1.7.12-1.1.3.2.SL3 X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:6955 Date: 2005-12-21T14:01:09+01:00 List-Id: 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/