Newsgroups: comp.lang.ada,comp.lang.c++,comp.object,comp.lang.clos
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!fas-news.harvard.edu!newspump.wustl.edu!news.ecn.bgu.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!news.sprintlink.net!pipex!uknet!comlab.ox.ac.uk!sable.ox.ac.uk!lady0065
From: lady0065@sable.ox.ac.uk (David Hopwood)
Subject: Re: C++ not OOP? (Was: Language Efficiency)
Message-ID: <1995May26.002844.6077@inca.comlab.ox.ac.uk>
Followup-To: comp.object
Sender: david.hopwood@lmh.ox.ac.uk
Organization: Oxford University, England
References: <dewar.797512974@gnat> <rshapiro-2405951316220001@esb.bbn.com> <dewar.801338679@porter> <rshapiro-2405952205400001@ipa.bbn.com>
Date: Fri, 26 May 95 00:28:44 BST
Lines: 25
Xref: glinda.oz.cs.cmu.edu comp.lang.ada:30404 comp.lang.c++:130209 comp.object:31549 comp.lang.clos:3034

[followups trimmed to comp.object]

In article <rshapiro-2405952205400001@ipa.bbn.com>,
R Shapiro <rshapiro@bbn.com> wrote:
>
>Oop says, among other things, that the users of any object can depend on
>knowing what behaviors that object implements, but should never depend on
>knowing what the object actually is. The type is part of the object's
>encapsulation, just as much as the implementation details of any given
>method or member-function would be. 
>
>If a user of an object depends on knowing that object's type (statically
>or dynamically, it doesn't matter), the encapsulation is broken.

You seem to be using the word 'type' very differently from how it is usually
meant. The whole point of a polymorphic type system is that types should
specify only the properties of an object that are needed by clients ('what
behaviors that object implements'), and nothing else.

Admittedly, many type systems end up specifying more than this (in particular,
they often rely on a specific inheritance structure, which is a mistake IMO).
But this is not a problem with static typing in general.

David Hopwood
david.hopwood@lmh.ox.ac.uk
