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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b1208117d36fb121 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-19 19:26:50 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: System.Address'Size - not a static integer expression? Date: 19 Apr 2002 19:26:50 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0204191826.e43c400@posting.google.com> References: <665e587a.0203060957.3682edf7@posting.google.com> <5ee5b646.0204091754.5dcfd16d@posting.google.com> <3CB47947.466E0E81@despammed.com> <5ee5b646.0204121220.606ecc36@posting.google.com> <3CB74D37.973A4C19@despammed.com> <5ee5b646.0204141201.1ffab2d8@posting.google.com> <3CBAEE01.D17C2DB0@despammed.com> <5ee5b646.0204161911.687f3144@posting.google.com> <3CBDBE76.F4FF3905@despammed.com> <5ee5b646.0204190606.4855f886@posting.google.com> <3CC03241.883A6E33@despammed.com> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1019269610 16353 127.0.0.1 (20 Apr 2002 02:26:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 20 Apr 2002 02:26:50 GMT Xref: archiver1.google.com comp.lang.ada:22801 Date: 2002-04-20T02:26:50+00:00 List-Id: Wes Groleau wrote in message news:<3CC03241.883A6E33@despammed.com>... > Now that is entirely possible. They are not opposites > in the RM, but they are opposites in general use. Yes, but this general use is fuzzy, since as I pointed out before, the notion of "known-at-compile-time" is recursively undecidable. Furthermore, I am not aware of the specific term static having been used in the context of any previous language. It's unusual for a language to give semantic significance to this notion. In most languages, the compiler is free to evaluate or not evaluate any expression at compile time as it pleases. This is also true in Ada, but a recognized *subset* of compile time evaluable cases is identified as part of the language. This allows many things to be checked at compile time (e.g. completeness of case statements) without having to limit the case tags to literal constants. Inevitably, the class of static expressions identified in the RM *must* be a subset of the expressions that can be evaluated at compile time. This is not a recognition of practical necessity, it is a mathematical theorem that can easily be proved by analogy to the halting problem. Of course a good Ada compiler will go well beyond this minimal subset and evaluate many more expressions at compile time, but it is *NOT* allowed to consider these to be static in the formal sense.