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,c469fdacc2f3302b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Dynamic Variant Record Creation Date: Wed, 17 Mar 2010 19:13:04 -0500 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1268871188 13559 69.95.181.76 (18 Mar 2010 00:13:08 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 18 Mar 2010 00:13:08 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:9641 Date: 2010-03-17T19:13:04-05:00 List-Id: "Adam Beneschan" wrote in message news:a4de16f2-1b14-4c9d-886a-2e61f6c01863@k6g2000prg.googlegroups.com... On Mar 16, 4:39?pm, "Randy Brukardt" wrote: ... >This has to use the same sort of case statement to initialize the >components in the variant parts. So I thought that basically the code >would be using the same logic, plus assigning initial values to the >non-variant components. As noted to Bob, that doesn't work in Janus/Ada. There also is a critical limitation on our intermediate code: there cannot be case statement-like control structures in expressions (we completely separate control flow and values in the intermediate code; there cannot be live values when there is control flow and vice-versa; values have very limited control flow possibilities from short circuit operations and loop initializers). If the idea offered much additional expressiveness, I wouldn't object, but it doesn't seem to have enough. Steve Baird and I had worked out a partially constrained discriminant constraint which would have provided a much better solution to this problem along with many others -- but Tucker Taft couldn't seem to wrap his mind around the idea (it seemed natural to me) and thus it got quickly killed. Thus I don't think there will be any relief. Randy. P.S. It probably isn't fair to single out Tucker for killing the idea, but since he usually has a much more flexible view of the world, it was bizarre that he couldn't understand it. I suspect many took that as an indication that it was fatally flawed; I suspect the problem more was one of presentation.