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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!postnews.google.com!i29g2000prf.googlegroups.com!not-for-mail From: Eric Hughes Newsgroups: comp.lang.ada Subject: Re: User-defined type attributes Date: Thu, 13 Mar 2008 20:55:27 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <30f629fd-69d3-4d40-995f-9933f52b8dad@s37g2000prg.googlegroups.com> <965suhjl0bxt$.74se2ylyksin.dlg@40tude.net> NNTP-Posting-Host: 166.70.57.218 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1205466927 14187 127.0.0.1 (14 Mar 2008 03:55:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 14 Mar 2008 03:55:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i29g2000prf.googlegroups.com; posting-host=166.70.57.218; posting-account=5RIiTwoAAACt_Eu87gmPAJMoMTeMz-rn User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20364 Date: 2008-03-13T20:55:27-07:00 List-Id: On Mar 13, 1:58 pm, "Dmitry A. Kazakov" wrote: > In which sense function is static? If understand what you wrote, it simply > means that the name "Callable" is static. That's not what I meant. Here's some sample notation, whose syntax is merely illustrative. -- Declaration of an attribute generic task type T ; function T'Callable return boolean ; -- Declaration of a (static) implementation function generic task type T ; function Callable_Impl return access function( X : T ) return boolean is static ; -- Binding of an implementation to an attribute generic task type T ; Obj : T ; for Obj'Callable use Callable_Impl.all( X => Obj ) ; Regardless of whatever syntax is appropriate, one of the things that makes me uncomfortable about attributes is that their definitions don't have the same rigor of notation in their definitions as, say, the standard libraries do. In the spirit of separation compilation, I'd like to see attribute definitions in specification packages, even if their bodies exist solely within a compiler's implementation. I wrote: > Functions on a type are part of the tradition algebraic > specification of a type. Attributes on a type are part of the > language environment inside of which a type specification is > expressed. These are very different. "Dmitry A. Kazakov" wrote: > I don't see why this distinction is important. I'm afraid I don't know how to argue this point briefly. It's the difference between language (in the proof theory sense) and metalanguage. I guess I've done too much formal logic too see this distinction and its import as anything other than obvious. Eric