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: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: OO, C++, and something much better! Date: 1997/01/07 Message-ID: #1/1 X-Deja-AN: 208303561 references: <5arhb0$d4e@top.mitre.org> organization: New York University newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-01-07T00:00:00+00:00 List-Id: Tucker said "It is true that Ada considers some expressions inside a generic as non-static, but that has no necessary effect on optimization. Many non-static expressions are computed at compile-time. There are certain places where the language requires static expressions, such as an expression in a case alternative, but compilers can and do still evaluate expressions that are not "officially" static at compile-time." One of the mistakes made in some Ada 83 compilers was to assume that the concepts of "evaluable at compile time" and "static expression" could be equated, but this was not true in Ada 83 and is not true in Ada 95. The set of static expressions is a subset of the expressions that can be evaluated at compile time, and compilers should treat them differently. To see how GNAT handles this, look at the unit Sem_Eval, and note that the section on "Compile-Time Known Values" addresses this issue.