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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c1fe4bc1dd51fc87 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: User-defined type attributes Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Wed, 12 Mar 2008 22:23:43 +0100 Message-ID: NNTP-Posting-Date: 12 Mar 2008 22:23:43 CET NNTP-Posting-Host: 64fd744a.newsspool2.arcor-online.net X-Trace: DXC=8cVOX^4SA>m]BlmkiiU@BiA9EHlD;3Ycb4Fo<]lROoRa8kF On Wed, 12 Mar 2008 11:58:29 -0700 (PDT), Eric Hughes wrote: > An attribute function must evaluate at compile-time, or perhaps more > subtly, prior to elaboration time. Much of the requisite apparatus is > already present with static expressions and preelaborable packages. > The standard would require an additional definition of the ability to > pre-elaborate a function body. While such a body might be restricted > to returning a single static expression, that seem a bit restrictive. Attributes in Ada aren't necessarily static, even type's attributes aren't. To me static functions is an independent, yet important issue. In my view attributes should be primitive operations. I would handle them similarly to prefix notation. I.e. X(Y,Z), Y.X(Z), Y'X(Z) considered equivalent. When applied to types, that should be treated just as a parameter of the type Tag. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de