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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Wed, 18 Aug 2010 12:02:48 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <4c6bc259$0$6887$9b4e6d93@newsspool2.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Wed, 18 Aug 2010 12:02:48 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="Mda950WjNwNLAFOE7yJXQw"; logging-data="13718"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FgyoFuahWZcF3SxjoF80e" User-Agent: slrn/0.9.9p1 (FreeBSD) Cancel-Lock: sha1:HBuWJT1LWxnkbDp+ItgOdxascd0= Xref: g2news1.google.com comp.lang.ada:13480 Date: 2010-08-18T12:02:48+00:00 List-Id: On 2010-08-18, Georg Bauhaus wrote: >> But what makes S_Expression an indefinite type? > > The type S_Expression is not constrained: Is_Atom has no fixed value. > It is an unknown discriminant. (LRM 3.3 says---in order to give a > reason I guess---"An indefinite subtype does not by itself provide > enough information to create an object".) > An S_Expression object that has Is_Atom = True can have a layout > different from that of an object with Is_Atom = False, and has > different components. The objects are heterogeneous in this sense. Oh ok, thanks a lot for the explanation. I thought discriminant really was like C's union, allocating enough room for any possible sub-object to fit (and adding an overhead to explicit which sub-object is currently used, to prevent C union's unfamous undefined behaviour issues). Actually it's much more than a union. Thanks a lot for your clarity, Natacha