This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Philosophy and object systems (was Re: goops/guile doc)


> Mailing-List: contact guile-help@sourceware.cygnus.com; run by ezmlm
> Precedence: bulk
> List-Unsubscribe: <mailto:guile-unsubscribe-mvanier=bbb.caltech.edu@sourceware.cygnus.com>
> List-Subscribe: <mailto:guile-subscribe@sourceware.cygnus.com>
> List-Archive: <http://sourceware.cygnus.com/ml/guile/>
> List-Post: <mailto:guile@sourceware.cygnus.com>
> List-Help: <mailto:guile-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
> Sender: guile-owner@sourceware.cygnus.com
> From: Per Bothner <per@bothner.com>
> Date: 29 Jan 2000 09:20:35 -0800
> User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) XEmacs/21.2(beta14) (Dionysos)
> Content-Type: text/plain; charset=us-ascii
> 
> Jost Boekemeier <jostobfe@linux.zrz.TU-Berlin.DE> writes:
> 
> > See Meyer's discussion about simulating genericity with inherintance
> > and vice versa.  
> 
> IIRC by "genericity" Meyer refers to parametric polymorphism, not
> generic functions.  Thus his discussion is not relevant to the current
> context (or any language with pure dynamic typing, such as Guile).
> -- 
> 	--Per Bothner
> per@bothner.com   http://www.bothner.com/~per/
> 

This is correct; the word "generic" is itself overloaded :-)  Eiffel
generics are essentially like C++ templates, but with some added features.

On a separate topic: even though CLOS-style generic functions can indeed
emulate single-dispatch object systems, my understanding is that the
resulting system will still not have encapsulation.  Most CLOS advocates
seem to feel that encapsulation isn't worth anything.  This is a legitimate
philosophical view.  The more interesting question is: can a CLOS-like
system emulate single-dispatch OO systems all the way, including
encapsulation?  If you want/need to use a module/package system on top of
CLOS to achieve this, go right ahead :-)  This is not just academic; 
guile is supposed to be able to mimic other scripting languages, and at
least some of them support private variables in their OO systems
(e.g. python).

Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]