comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Visible or hidden derivation for controlled types ?
Date: 1997/03/16
Date: 1997-03-16T00:00:00+00:00	[thread overview]
Message-ID: <dewar.858568127@merv> (raw)
In-Reply-To: mheaney-ya023680001603971555370001@news.ni.net


<<I think the general advice according to the Rational is that the derivation
be done privately.  The guideline is that clients shouldn't care whether
the type inherits from Controlled; that is an implementation detail.  If
clients really don't care, then it's an even better idea to hide the
derivation, so the client can't accidently call Initialize or Adjust.>>

I am not sure I agree, it is certainly part of the visible public
specification that the type has automatic storage collection on destruction,
which in Ada, typically means that it is controlled. 

It seems quite natural to put the Finalize in the public part, and use it
as the focal point for the documentation that provides for automatic
storage collection.

The counter argument is that the implementation might have garbage
collection, and not need the finalize, and that therefore it is indeed
an implementation detail.





      reply	other threads:[~1997-03-16  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-14  0:00 Visible or hidden derivation for controlled types ? Mats Weber
1997-03-15  0:00 ` Tom Moran
1997-03-17  0:00   ` Jon S Anthony
1997-03-16  0:00 ` Matthew Heaney
1997-03-16  0:00   ` Robert Dewar [this message]
replies disabled

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