comp.lang.ada
 help / color / mirror / Atom feed
From: Ed Falis <efalis@mediaone.net>
Subject: Re: Assertions in the Next Ada Standard
Date: Sat, 12 Jan 2002 21:27:28 GMT
Date: 2002-01-12T21:27:28+00:00	[thread overview]
Message-ID: <3C40AB21.6070908@mediaone.net> (raw)
In-Reply-To: 3C409568.4000102@look.ca

FGD wrote:


>  From my perspective, invariants have many merits. The most important is 
> that it provides a uniform way of implementing all the type improvements 
> I ever thought of in a uniform way. I'm still not sure about 
> pre-/post-conditions. Right now, it seems to me that the associated 
> complexities outnumber the benefits and I'm still curious about 
> practical applications...

In the Eiffel model, the purpose of pre and post conditions is to 
establish the contract between caller and callee.  The practical benefit 
is that if a precondition is violated, then client code is where you 
look to find the problem;  if the postcondition is violated the service 
code is where you start.  An additional advantage of this approach is 
the elimination of code in services that would check explicitly for 
violations of the preconditions during deployment (the usual model is to 
enable pre and post condition checking during development, and to 
disable it during deployment).

- Ed




  reply	other threads:[~2002-01-12 21:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-11  6:20 Assertions in the Next Ada Standard Richard Riehle
2002-01-11  9:23 ` Dale Stanbrough
2002-01-11 13:47   ` Robert A Duff
2002-01-11 23:28   ` Nick Roberts
2002-01-12  1:30     ` Darren New
2002-01-11 20:07 ` FGD
2002-01-11 20:39   ` Wes Groleau
2002-01-12  4:56     ` Robert Dewar
2002-01-12  7:30   ` Richard Riehle
2002-01-12 19:58     ` FGD
2002-01-12 21:27       ` Ed Falis [this message]
2002-01-12 22:45     ` Darren New
2002-01-14 17:20       ` Robert A Duff
2002-01-14 17:42         ` Darren New
2002-01-14 23:16     ` Mark Lundquist
2002-01-17  6:23     ` Richard Riehle
replies disabled

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