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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/11/18 Message-ID: #1/1 X-Deja-AN: 197342725 references: <325BC3B3.41C6@hso.link.com> <56kt98$6at@fozzie.sun3.iaf.nl> organization: New York University newsgroups: comp.lang.ada Date: 1996-11-18T00:00:00+00:00 List-Id: Bob Duff says "Type Unbounded_String (a private type) has no Finalize operation. If the implementation puts one in the private part, then it had better not do anything that violates the semantics. And the semantics of Unbounded_Strings *are* specified pretty clearly (at least as clearly as you can get when writing in English, as opposed to some formal notation). And those semantics do not call for any erroneousness." Where does it specify "pretty clearly" the semantics of assigning unbounded strings. Maybe I have a defcetive copy of the RM, the word assign only occurs in 88: 88 No storage associated with an Unbounded_String object shall be lost upon assignment or scope exit. this of course is a nonsense requirement since the formal notion of losing storage is not defined, but informally we get the idea. So, what is the semantics of assignment of unbounded strings? Presumably the same as normal assignment for other types, but that can have all sorts of different semantics depending on the full type, and we are not supposed to do anything that relies on this. For example, if the full type is a controlled type, then the RM specifies various things about the way assignment works. Basically the rule for the semantics of assignment of a private type is that it is goverened by the semantics of assignment to the underlying full type. So, the long and the short of it is that when you assign a private type, you don't know exactly what the semantics are. This is a similar situation to the stream attributes on unbounded_string. The RM leaves them completely undefined. A recent AI (apporved yet> I can't remember ....) specifies that they "work" properly, but we did not discuss assignment at the same time, maybe we should! I am sure that I can't read Bob Duff's semantics into the RM without a healthy dose of interpretation. Such interpretation is usually guided by what you want, but I am not so sure I agree that I want a huge overhead of locking and unlocking just so that unbounded strings shared between tasks "work" right.