home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.object:3258 comp.lang.clos:662
- Path: sparky!uunet!ogicse!uwm.edu!rpi!batcomputer!munnari.oz.au!metro!graham
- From: graham@maths.su.oz.au (Graham Matthews)
- Newsgroups: comp.object,comp.lang.clos
- Subject: Beginner's Question - CLOS
- Message-ID: <graham.714230337@galois>
- Date: 19 Aug 92 13:18:57 GMT
- Article-I.D.: galois.graham.714230337
- References: <1992Aug5.162329.22871@ucunix.san.uc.edu> <KERS.92Aug18110434@cdollin.hpl.hp.com> <=!!nmlj.objsys@netcom.com> <KERS.92Aug19111407@cdollin.hpl.hp.com>
- Sender: graham@maths.su.oz.au
- Organization: School of Mathematics and Statistics, University of Sydney
- Lines: 43
- Nntp-Posting-Host: galois.maths.su.oz.au
-
- (Chris Dollin) writes:
- >In the software reality, M can certainly be the doer; consider CLOS, for
- >example, with generic functions rather than objects-that-know-how-to.
-
- Not being overly familiar with CLOS I am intrigued by this comment
- Chris. I am presently looking at ways in which Object-Orientedness
- is present in languages with an eye to adding it to an existing language
- I have written. Now what I know of OO comes mainly from using Eiffel - that
- is one has a class which contains methods, one makes an instance of a
- class using a constructors, and one invokes methods using the hotly
- debated O.M notation. Oh yeah and there is a form of inheritance thrown
- in here - thats how I understand things. This is the objects-that-know-
- how-to flavour of OO I presume.
-
- Now to CLOS. The above comment would suggest that CLOS does not do
- things in the objects-that-know-how-to flavour. If this is so the
- only sort of alternative I can think of (not knowing CLOS) is to
- have objects that are defined by some sort of record structure, where
- each slot can be a function. I presume that a function can take an
- argument of type X or any sub-type of X. How is this subtyping specified.
- (note: I appreciate that I am using sub-type in a very sloppy sense
- here but I think it is obvious what I mean here). Is this indeed what
- CLOS does? If so how are sub-types specificied. I would be
- interested in seeing a specification for say a stack in CLOS (any
- takers out there). Assuming that this is indeed the approach taken
- by CLOS what does it buy you? It would seem to me to be basically no
- different to the other approach - the main difference being in the
- fact that the Eiffel approach has method invocation based on one
- argument. Outside of this what does the CLOS approach have by way of
- advantages?
-
- I don't intend to start a flame war here between Eiffel and its
- adherents and the CLOS people. I am merely interested in why the two
- different approaches are taken. I wish to understand the strenghts
- and weakness of each before jumping in over my head.
-
- Email is welcome
-
- graham
- --
- Graham Matthews And it's true we are immune
- Pure Math, Uni.Sydney, Oz When fact is fiction and T.V. is reality
- graham@maths.su.oz.au
-