comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@avercom.net>
Subject: Re: Another good URL for all you C++ haters
Date: Fri, 07 Sep 2001 13:54:52 -0400
Date: 2001-09-07T17:54:55+00:00	[thread overview]
Message-ID: <3B9909EC.249E165D@avercom.net> (raw)
In-Reply-To: 87u1yhmitg.fsf@deneb.enyo.de

Florian Weimer wrote:
> 
> chris.m.moore@amsjv.com (Chris M. Moore) writes:
> 
> >   Even Floyd, who loves the language, admits that, "Its greatest
> >   weaknesses is a flaw in the interface/implementation separation. A
> >   class exposes its private data/methods to the world and a programmer
> >   must use some tricks (that should be supported directly in the
> >   language) to overcome this."
> 
> Doesn't have Ada a similar problem?

Ada requires the full definition of a private type to be
in the package spec, but it doesn't require the declaration
of "helper" functions the way C++ does.  Helper functions
can be declared in the package body, without perturbing the spec.

[In C++, one can use a "friend" class to contain the helper
functions, but that is pretty obscure.]

Note that both C++ and Ada allow access/pointer types to be declared
without exposing the full details of the target type.
-- 
-Tucker Taft   stt@avercom.net   http://www.avercom.net
Chief Technology Officer, AverCom Corporation (A Titan Company) 
Bedford, MA  USA (AverCom was formerly the Commercial Division of AverStar:
http://www.averstar.com/~stt)



  parent reply	other threads:[~2001-09-07 17:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-05 11:08 Another good URL for all you C++ haters Chris M. Moore
2001-09-05 12:22 ` Gerhard Häring
2001-09-05 13:43   ` Ted Dennison
2001-09-06 12:04     ` Chris M. Moore
2001-09-06 19:12       ` Robert Dewar
2001-09-07 10:30         ` Chris M. Moore
2001-09-07 11:12           ` Larry Kilgallen
2001-09-08  9:37           ` Florian Weimer
2001-09-05 14:43 ` James Rogers
2001-09-05 21:25 ` Florian Weimer
2001-09-05 21:49   ` James Rogers
2001-09-06 15:33     ` John McCabe
2001-09-06 16:57       ` James Rogers
2001-09-07 17:54   ` Tucker Taft [this message]
2001-09-08 10:11     ` Florian Weimer
replies disabled

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