comp.lang.ada
 help / color / mirror / Atom feed
From: Anh Vo <anhvofrcaus@gmail.com>
Subject: Re: My bug or else regarding Visibility Rules
Date: Mon, 1 Apr 2013 18:52:16 -0700 (PDT)
Date: 2013-04-01T18:52:16-07:00	[thread overview]
Message-ID: <d09afc35-2ca5-4b45-9734-7263e6d353c4@googlegroups.com> (raw)
In-Reply-To: <kjdabm$dck$1@munin.nbi.dk>

On Monday, April 1, 2013 5:56:19 PM UTC-7, Randy Brukardt wrote:
> "Anh Vo" <anhvofrcaus@gmail.com> wrote in message news:89292c53-1d4e-48a7-b2ae-a10983ef4168@googlegroups.com... > On Thursday, March 28, 2013 3:03:13 PM UTC-7, Randy Brukardt wrote: >> "Adam Beneschan" <adam@irvine.com> wrote in >>> the >> > keyword PRIVATE >> > when that keyword is present; but if you take it out, the declaration >> > list >> > ends at "end Circular_Queue;". >> 
>>> Which is the long way to say that the expression of a public aspect has
>>> be made up only of public functions and objects. Otherwise, how would a 
>>> caller be able to figure out the meaning of a precondition that they are 
>>> required to meet? Clients can never be required to look in a private 
>>> part. 

>> Actually, this part only involves post-conditions (implementer), not 
>> preconditions (clients). 

>Clients need to know about postconditions as well, so that they know what >properties are guaranteed after a call. Typically, that will show that 
>some or all of a following precondition is going to be satisfied. Remember, >both of these matter to both sides of a call: A precondition is a requirement >on a caller and a promise to an implementation; a postcondition is a promise >to a caller and a requirement on an implementation. Randy.

I try to put as much as post-conditions that the language allows. On the other hand, I do not want to expose any thing that the clients can modify. In addition, taking away post-conditions involving Buffer, In_Index, and Out_Index objects by moving them into the body does degrade much implementation promise in this case.

A. Vo   




  reply	other threads:[~2013-04-02  1:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 19:54 My bug or else regarding Visibility Rules Anh Vo
2013-03-28 20:58 ` Adam Beneschan
2013-03-28 22:03   ` Randy Brukardt
2013-03-30  6:05     ` Anh Vo
2013-04-02  0:56       ` Randy Brukardt
2013-04-02  1:52         ` Anh Vo [this message]
2013-04-02  8:26           ` Simon Wright
2013-04-02 18:17             ` Anh Vo
2013-04-02 20:16               ` Simon Wright
2013-04-03 23:21                 ` Anh Vo
2013-04-04  8:19                   ` Simon Wright
2013-04-04 19:21                     ` Anh Vo
2013-04-04 19:47                       ` Simon Wright
2013-04-02 22:04           ` Randy Brukardt
2013-03-28 22:06   ` Anh Vo
replies disabled

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