From: "Nick Roberts" <nickroberts@adaos.worldonline.co.uk>
Subject: Re: List container straw man (NJR V4)
Date: Sat, 17 Nov 2001 23:30:15 -0000
Date: 2001-11-17T23:30:15+00:00 [thread overview]
Message-ID: <9t6srp$nbro$3@ID-25716.news.dfncis.de> (raw)
In-Reply-To: ug07drygb.fsf@gsfc.nasa.gov
"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:ug07drygb.fsf@gsfc.nasa.gov...
> "Nick Roberts" <nickroberts@adaos.worldonline.co.uk> 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
next prev parent reply other threads:[~2001-11-17 23:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-16 0:14 List container straw man (NJR V4) Nick Roberts
2001-11-17 18:22 ` Nick Roberts
2001-11-17 19:26 ` Stephen Leake
2001-11-17 23:30 ` Nick Roberts [this message]
2001-11-17 20:47 ` Jeffrey Carter
2001-11-17 23:44 ` Nick Roberts
2001-11-20 19:39 ` Mark Lundquist
2001-11-19 17:14 ` Ted Dennison
2001-11-22 3:18 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox