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,9272170244740794 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-17 15:46:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!ppp-1-182.cvx4.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: List container straw man (NJR V4) Date: Sat, 17 Nov 2001 23:44:27 -0000 Message-ID: <9t6srq$nbro$4@ID-25716.news.dfncis.de> References: <9t1lp4$16unne$3@ID-25716.news.dfncis.de> <9t69pc$jh6l$2@ID-25716.news.dfncis.de> <3BF6CCD6.F7195928@acm.org> NNTP-Posting-Host: ppp-1-182.cvx4.telinco.net (212.1.148.182) X-Trace: fu-berlin.de 1006040763 765816 212.1.148.182 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:16660 Date: 2001-11-17T23:44:27+00:00 List-Id: "Jeffrey Carter" wrote in message news:3BF6CCD6.F7195928@acm.org... > ... > This is difficult to understand. This is the only place I've ever seen > the concept of "cursorage"; it is certainly not a standard list concept. > Combining the indexed operations and the cursor-based operations is > called control coupling and makes the operations difficult to > understand. The word 'cursorage' is my own Carrollean invention. Feel free to improve upon it. As for the combination of offset and cursor-basing, I shall undo this combination, to produce separate sets of subprograms (as, in fact, I had before). > The use of undefined types is confusing. I suppose they're declared in > the parent package, but since we can't see the parent package it's still > confusing. [Smacks forehead] Sorry! I'll put the base package into the picture. > The use of an abstract type and operations followed by a non-abstract > extension and non-abstract operations doubles the size of the > specification without adding any value that I can see. Every concrete > list is going to have to declare and implement every operation, so > declaring them abstract an additional time seems like a waste of time. There are good reasons for having an abstract base. Avoiding extra code is not a good reason for getting rid of it. However, your comments have prompted me to re-evaluate putting the concrete in with the abstract. I think I must remove it (to childerhood). The idea was to avoid a further instantiation (since a child package must be generic), but imposing a concrete type on any would-be list (derived from Abstract_List) is too mauch baggage. Shame: we're back to two instantiations; it seems hard to get away from them! > Is_Empty and Length are basic list operations that are missing. Oops! In they go. (Got lost in the rush.) > A component should not raise predefined exceptions such as > Constraint_Error. Use meaningful exceptions such as Cursor_Is_Null. For some conditions, yes. Will do. > A concrete implementation should document the time complexity of every > operation, so the client can make appropriate choices of operations. > ... > Each operation should document its pre- and post-conditions, where > applicable. Each operation should document what exceptions it may raise > and under what circumstances; since exceptions are generally indications > that the client has violated a precondition, the documentation for > preconditions is usually a good place to document exceptions. Okay. I said the documentation was brief! I'll add this stuff ASAP. > With some more work this could be an acceptable standard specification. Cool! -- Best wishes, Nick Roberts