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:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!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:30:15 -0000 Message-ID: <9t6srp$nbro$3@ID-25716.news.dfncis.de> References: <9t1lp4$16unne$3@ID-25716.news.dfncis.de> <9t69pc$jh6l$2@ID-25716.news.dfncis.de> NNTP-Posting-Host: ppp-1-182.cvx4.telinco.net (212.1.148.182) X-Trace: fu-berlin.de 1006040762 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:16659 Date: 2001-11-17T23:30:15+00:00 List-Id: "Stephen Leake" wrote in message news:ug07drygb.fsf@gsfc.nasa.gov... > "Nick Roberts" writes: > > > Okay, I've popped my own proposal on a web site: > > > > http://www.adaos.ukf.net > > Excellent. > > Please add a pointer to my proprosal: > http://users.erols.com/leakstan/Stephe/Ada/sal.html Done! > Also to PragmArc: > http://home.earthlink.net/~jrcarter010/pragmarc.htm Already there. > You might want to distinguish between more or less complete libraries > (all except yours and Ted's), and strawman proposals. I'll go the other way, and not make any assertion about the completeness of any of them. > I suggest making the number of cursors a generic formal parameter, > with a default of 8. Agreed. Will do. > The documentation does not discuss the rationale for using an abstract > base type. This is an important design decision; it should be clearly > justified (and I know it's important to you). Will do. > I'm not clear which element this function returns: > > function Element > (Source : in Abstract_List; > Base : in Base_Designator := 1; > Facing : in Direction := Forward; > Offset : in Integer := 0) > return Element_Type is abstract; > > The doc says Base = 1 means cursor 1, and Offset = 0 means the > position "at" the cursor. But a cursor is between elements. So I think > you need to say "after the cursor, in direction specified by Facing". That is correct. I will add this to the documentation. > This function can raise some exception if the cursor is null or after the > end of the list; the spec should say what exception. Yes: a specific exception. > I find the mixed meaning for Base too confusing (Base = 0 means Offset > is absolute, Base > 0 means offset is relative to that cursor). I'd > prefer two functions, one with a Cursor parameter, and one without. It > took me a while to figure out how to access an element via a cursor. > Then you can group the "cursor-oriented" subprograms together, and the > "index-oriented" subprogams together. This is exactly the design I had before 'merging' the two sets of subprograms. I will undo this. > I also have a quibble; please consider formatting the code as above. > That's the format used in the RM, and in GNAT. There's a function in > Emacs Ada-mode that will do the alignment of the parameters > automatically. My stuff uses that format. Hmm, Ted isn't using that > format either. I can't find a multiline subprogram spec in PragmaArc, > so I don't know what style Jeff might prefer. Corey's style is close > to yours. Well, we can argue style later! I agree with you, and will format similar to the RM95. -- Best wishes, Nick Roberts