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,99934eaa35a086e8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 09 Feb 2005 12:32:53 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: Why should the value for a discriminant be static? Date: Wed, 9 Feb 2005 12:34:41 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-k9teTZE1fD2B8DF85g7EYhKS7u1E1vTKpXcnbMjeksmKEy8M6OiSsT5H8d9Zs1bpOo8m6WMPQ/SrmU4!XhyNXKk3EdZd8VahbwPjz1wCCtM/Kg7CIbEh0gZDJgBhqFwrI0nt4icywxdql30zNRw3su51zW6P X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.23 Xref: g2news1.google.com comp.lang.ada:8211 Date: 2005-02-09T12:34:41-06:00 List-Id: "Jacob Sparre Andersen" wrote in message news:rlszmyd956d.fsf@jacob.crs4.it... > Occasionally I run into the limitation that the value for a > discriminant be static. I can design my way around the limitation > (when I remember it), but I would like to know the reason. (also > because it might make it easier for me to remember the rule) The only place I know of off-hand where there is such a limitation is with aggregates. There, the limitation is necessary so that compiler can know the set of components for the aggregate. Otherwise, it would be impossible to check that components are given, which is *the* major benefit of using an aggregate over a series of component assignments. I suppose such a check could be done at runtime, but that would be substantially less safe, as errors could exist in a program for a long time and occur only in unusual conditions after deployment. Anyway, does that answer your question, or was this in some other context? Randy Brukardt