comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Horan <peter@deakin.edu.au>
Subject: Re: Visibility and access to "public" attributes
Date: 1997/09/02
Date: 1997-09-02T00:00:00+00:00	[thread overview]
Message-ID: <340B8771.424A@deakin.edu.au> (raw)
In-Reply-To: EFuyKK.J61@syd.csa.com.au


Don Harrison wrote:
> 
> Mike Card wrote:
> 
> [..]
> :I know that Eiffel can totally hide the attributes of an object (i.e.
> :accessed via methods only) as well. When writing Eiffel programs, how
> :do you decide when to make a type's attributes "read-only visible"
> :and when to hide them?
> 
> You export them when they're needed (or may be needed) by clients; otherwise,
> you hide them.
> 
One must export parameters and functions when they are needed to verify
pre-conditions. This is an Eiffel validity requirement (VAPE). (I am
reminded of keeping one's fingers crossed when making promises :-)).
This does not apply to features in post-conditions and invariants, which
may be more restrictive than the client needs without harm.

-- 
Peter Horan                     School of Computing and Mathematics
peter@deakin.edu.au             Deakin University
+61-3-5227 1234 (Voice)         Geelong, Victoria 3217, AUSTRALIA
+61-3-5227 2028 (FAX)           http://www.cm.deakin.edu.au/~peter




  parent reply	other threads:[~1997-09-02  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-29  0:00 Visibility and access to "public" attributes card
1997-08-29  0:00 ` Patrick Doyle
     [not found]   ` <JSA.97Aug29190453@alexandria.organon.com>
1997-08-30  0:00     ` Patrick Doyle
1997-08-30  0:00       ` Jon S Anthony
1997-09-01  0:00         ` Patrick Doyle
1997-08-30  0:00 ` Darren New
1997-09-02  0:00 ` Don Harrison
1997-09-02  0:00   ` Don Harrison
1997-09-02  0:00     ` Jon S Anthony
1997-09-02  0:00     ` Gavin Collings
1997-09-02  0:00       ` Patrick Doyle
1997-09-02  0:00       ` Nick Leaton
1997-09-02  0:00         ` Gavin Collings
1997-09-03  0:00       ` Don Harrison
1997-09-05  0:00       ` Nick Leaton
     [not found]         ` <01bcba0e$418f7380$2001df0a@gavinspc>
1997-09-05  0:00           ` Nick Leaton
1997-09-05  0:00         ` Patrick Doyle
1997-09-02  0:00   ` Peter Horan [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-08-29  0:00 card
1997-08-29  0:00 ` Ted Velkoff
1997-08-30  0:00 ` Darren New
1997-08-30  0:00 ` Patrick Doyle
1997-09-02  0:00 card
replies disabled

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