comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Introducing memcache-ada, a memcached client in Ada
Date: Mon, 20 Dec 2010 12:36:45 -0700
Date: 2010-12-20T12:36:45-07:00	[thread overview]
Message-ID: <ieobjd$inb$1@tornado.tornevall.net> (raw)
In-Reply-To: <4d0f1316$0$23759$14726298@news.sunsite.dk>

On 2010-12-20 01:43, R Tyler Croy wrote:
>
> I look forward to any comments or suggestions as to the code
> quality/structure.

I have looked only at the specification, since that's the only part a client 
should need to look at. Initial impressions:

I see a number of declarations in the visible part of the specification that are 
not referenced in the visible part nor needed for the client to use the package. 
Only things needed in the visible part or needed by the client to use the 
package should appear in the visible part.

[In order of preference, things should be declared

1. In the body
2. In the private part (Is Ada the only language with private parts?)
3. In the visible part]

Similarly, context clauses should use "private with" for things only referenced 
in the private part.

The type Flags and the Set_Flags parameters of that type are not documented in 
the spec; if possible, they should be. In particular, the effect of the default 
value for Set_Flags should be described.

The meaning of the expiration parameters, and especially of their default 
values, should be documented. The default of zero would seem to mean immediate 
expirations, which doesn't seem very useful.

The meaning of the Boolean return values from some of the functions (which also 
appear as parameters) is unclear and should be documented.

Some exceptions appear at the end of the visible part. Presumably some of the 
operations may raise these exceptions, but which operations raise which 
exceptions, and in what circumstances, is not documented. Since declarations 
should appear before they are referenced, the exception declarations should 
appear before the comments in which they are referenced.

-- 
Jeff Carter
"Crucifixion's a doddle."
Monty Python's Life of Brian
82



  parent reply	other threads:[~2010-12-20 19:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20  0:43 Introducing memcache-ada, a memcached client in Ada R Tyler Croy
2010-12-20  8:25 ` Thomas Løcke
2010-12-20 10:16   ` Georg Bauhaus
2010-12-20  9:36     ` Thomas Løcke
2010-12-20 20:14     ` R Tyler Croy
2010-12-21  0:56     ` Randy Brukardt
2010-12-21  7:52       ` Dmitry A. Kazakov
2010-12-20 19:36   ` Jeffrey Carter [this message]
2010-12-20 20:16     ` R Tyler Croy
2010-12-20 22:03     ` Simon Wright
2010-12-20 22:48       ` R Tyler Croy
2010-12-20 23:44         ` Simon Wright
2010-12-21 11:10           ` Georg Bauhaus
2010-12-21 11:21             ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox