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,604e0f87aa06eab6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-21 13:07:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.rwth-aachen.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Imitation is the sincerest form of flattery Date: Fri, 21 Mar 2003 21:07:48 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <1047665830.579605@master.nyc.kbcfp.com> <7eee7v4hpvj0i5s345uonlen5315rhiau8@4ax.com> <1ec946d1.0303201528.6c9b2c9e@posting.google.com> NNTP-Posting-Host: d2-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1048280868 13656 134.91.1.15 (21 Mar 2003 21:07:48 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Fri, 21 Mar 2003 21:07:48 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/831)) Xref: archiver1.google.com comp.lang.ada:35612 Date: 2003-03-21T21:07:48+00:00 List-Id: Dmitry A. Kazakov wrote: :>package P is :> :> type Unbounded_String (<>) is private; :> :>private :> :> type Unbounded_String is :> array (Positive range <>) of Character; :> :>end P; : : This would be a private type implemented by an array, but not an array : implemented by some other type. Where will this leed coders and readers? If I understand correctly, what you want is an option to have objects with array access (attributes etc.) that need not be arrays, privately. The same for other "ADTs" that are provided by the language. That is, an option to override the compilers regular job? I'd prefer considering a rule that said, 'No arrays at all, please, in specs!' :-) In Eiffel, the basic types can be extended, and you can have a sparse matrix derived from an ARRAY2, if you want to provide your own implementation details, I think. If, for a moment, you do not insist on arrays being suitable ADTs for public access in specs, you can do that in Ada too, of course. (With tagged types or with formal generics describing the "array like" interface, which is not possible in Eiffel other than using FUNCTION types(?), afaics.)