🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3492

Re: CHALLENGE: heterogeneous collections

#3492
From: Edward JUNG
Date: Wed, 03 Apr 1991 07:55
44 lines
2611 bytes
In article <CIMSHOP!DAVIDM.91Mar28191355@uunet.UU.NET> cimshop!davidm@uunet.UU.NET (David S. Masterson) writes:
>>>>>> On 26 Mar 91 10:10:51 GMT, boissier@irisa.fr (franck boissiere) said:
>
>Franck> There is at least one kind of system which must allow heterogeneous
>Franck> collections. It is often called Open System. Is these systems the
>Franck> person who writes the kernel do not know anything about what objects
>Franck> will be used by the persons who will extend the system.
>
>What message would this OpenSystem send to the objects that it deals with?
>What do those messages have in common?  If they have nothing in common, then
>how does the OpenSystem even know what messages to send to these collections
>of objects?
>

No, you are missing the point. An open system would interface with objects
that conform to a certain interface. The notion in an "in the large"
environment is that conformance is independent of the inheritance
hierarchy -- that is, the conforming objects do not have to share the
same inheritance graph or subclass from the same object, rather they
implement the same protocol.

This is encapsulation, an important and oft-overlooked aspect of
object orientation (or object basis, depending upon your nomenclature).

If I want to build an interface to a spell checker such that anyone
could write a conforming spell checker, I write to an interface
(or protocol, depending upon your terminology). This way I can send
the right messages to the object without knowing about it (the
thing is "type safe" at compile time, but would involve a run-time
assertation if defensively programmed), and the implementation of
that object is independent of the inheritance graph.

Such interface or protocol-based implementations are not supported
by most popular object-oriented languages, although some people
are considering extensions to do so.

This is part of the whole "inheritance breaks encapsulation" notion.


--
Edward Jung
Microsoft Corp.

My opinions do not reflect any policy of my employer.
Technical Details
Message-ID: <71667@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!microsoft!edwardj
References: <1991Mar25.220525.11087@leland.Stanford.EDU> <1991Mar26.101051.29527@irisa.fr> <CIMSHOP!DAVIDM.91Mar28191355@uunet.UU.NET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!microsoft!edwardj
From: edwardj@microsoft.UUCP (Edward JUNG)
Newsgroups: comp.lang.misc,comp.object
Subject: Re: CHALLENGE: heterogeneous collections
Message-ID: <71667@microsoft.UUCP>
Date: 3 Apr 91 07:55:19 GMT
References: <1991Mar25.220525.11087@leland.Stanford.EDU> <1991Mar26.101051.29527@irisa.fr> <CIMSHOP!DAVIDM.91Mar28191355@uunet.UU.NET>
Reply-To: edwardj@microsoft.UUCP (Edward JUNG)
Distribution: comp
Organization: Microsoft Corp., Redmond WA
Lines: 44