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,5606d8433901738c X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Allocating "initialized" limited types... Date: 1996/09/05 Message-ID: #1/1 X-Deja-AN: 178749422 references: <1996Sep4.183415.17277@ocsystems.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-09-05T00:00:00+00:00 List-Id: In article , Jon S Anthony wrote: >Actually, this supports my notion that the idea of "initialization" >after creation of the limited object (in an allocator in particular) >is not the best way of thinking of it. The "value is the object" bit >hits this pretty well. In fact, that is pretty much _exactly_ the >point. So, since the design team thought the same here, the whole >thing becomes rather mysterious as to why things turned out as they >did. Well, the Ada 9X design team thought this. And I remember writing this particular paragraph after much discussion with Tucker, and rather late in the Ada 9X project. But Ada 95 inherited the initialization mechanisms from Ada 83, and there was no pressure to change them (no "Revision Requests" along those lines, as far as I remember). Frankly, it never occurred to me to change the initialization stuff. (Although it apparently did occur to Henry Baker, before Ada 9X.) Nothing is really broken -- there's just a nice piece-to-have feature that's not there for limited types. (Most languages don't have that feature for *any* types, and don't have limited types at all! Think about an aggregate (or whatever it's called) in C, where any missing fields are conveniently filled with zeros. >The problem (well, the one at the center of this thread anyway) has >nothing at all to do with tagged types. It concerns limited types and >"initialized" allocators. So, presumably T is the _limited_ type that >I originally mentioned (and thus C is limited too). You misunderstand the suggestion. Make T non-limited, but C (containing a T) limited. It works for tagged and untagged. - Bob