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,FREEMAIL_FROM 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-22 15:12:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!53ab2750!not-for-mail From: "AG" Newsgroups: comp.lang.ada References: <1047665830.579605@master.nyc.kbcfp.com> <7eee7v4hpvj0i5s345uonlen5315rhiau8@4ax.com> <4dkea.75440$gi1.38045@nwrdny02.gnilink.net> Subject: Re: Imitation is the sincerest form of flattery X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Sun, 23 Mar 2003 11:12:07 +1200 NNTP-Posting-Host: 219.88.61.165 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1048374733 219.88.61.165 (Sun, 23 Mar 2003 11:12:13 NZST) NNTP-Posting-Date: Sun, 23 Mar 2003 11:12:13 NZST Organization: Xtra Xref: archiver1.google.com comp.lang.ada:35628 Date: 2003-03-23T11:12:07+12:00 List-Id: "Pascal Obry" wrote in message news:ubs03lcdz.fsf@wanadoo.fr... > > "Dmitry A. Kazakov" writes: > > > > But how do you access element into this array, what would be done > > > for: > > > > > > M : Sparse_Matix (1 .. 7, 1 .. 90); > > > > > > M (2, 6) := ...; > > > > I have to prove an implementation for Set_Element, I suppose. When I declare > > that Sparse_Matrix an array, I have to override all the abstract methods of > > the universal array type might have. Set_Element is one of them. > > You mean that the compiler must generate a call to Set_Element/Get_Element for > every reference to an array item, right ? Well, I don't know what Dmitry meant of course :) But my case would be that of the compiler knowing pretty darn well what the index is - it could be just a simple integer or so. The whole point is not about hiding the info from the compiler (how could you?) but about hiding/decoupling it from the clients of the package. And keeping control of it. And being able to change it without breaking all the clients ...