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,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-07 05:54:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!newsfeed.mathworks.com!cyclone.swbell.net!bos-service1.ext.raytheon.com!bos-service2.ext.raytheon.com.POSTED!not-for-mail From: Wes Groleau Reply-To: wesgroleau@despammed.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. References: <3E147D79.2070703@cogeco.ca> <4519e058.0301031434.51a0c880@posting.google.com> <1041909275.331518@master.nyc.kbcfp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <0NAS9.2351$c6.2577@bos-service2.ext.raytheon.com> Date: Tue, 07 Jan 2003 08:40:01 -0500 NNTP-Posting-Host: 151.168.133.155 X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 1041946812 151.168.133.155 (Tue, 07 Jan 2003 08:40:12 EST) NNTP-Posting-Date: Tue, 07 Jan 2003 08:40:12 EST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:32679 Date: 2003-01-07T08:40:01-05:00 List-Id: > > But I wish I could >> define things like 'First and 'Last when I create a >> private type for which they are meaningful. > > In C++, you can set up arbitrary "attributes" of this > sort by using a technique called traits. You define a I'm not interested in "arbitrary" attributes. I'm interesting in creating an abstraction that has the attributes of being some kind of "number" but is still user-defined. In Ada and C++, we can overload operators so that the abstraction is supported. But if we have a legitimate reason to "hide" the implementation with "private" we give up the ability to query the attributes.