🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clos
Article #223

CLOS/Flavors (was Re: Is CLOS Object-Oriented ???)

#223
From: Jamie Zawinski
Date: Sat, 17 Nov 1990 01:34
27 lines
1696 bytes
In article <3904@s3.ireq.hydro.qc.ca> gamin@ireq-robot.hydro.qc.ca (Martin Boyer) wrote:

    Consider the classic
    
    (send square :draw-yourself)
    
    and let's say we want to add some functionality by allowing an extra
    argument to indicate where this square should be drawn:
    
    (send square :draw-yourself :on-screen)
    (send square :draw-yourself :on-printer)
    
    In Flavors, one would have to re-write the draw-yourself method to
    discriminate on the second argument, because the procedure depends on
    it.  But wait!  isn't that what "send" was supposed to do in the first
    place, discriminate on the first argument to find out which method to
    use?  We now need 'draw-yourself' methods specialized on more than one
    argument, the object and the medium (as if, in this case, the medium
    IS the message :-)).

BZZZZZT!  Thank you for playing.

(defmethod (square :draw-yourself :case :on-screen) () ... )
(defmethod (square :draw-yourself :case :on-printer) () ... )

  -- Jamie "you can supplant old-Flavors when you pry it from my 
     cold dead fingers" Zawinski
Technical Details
Message-ID: <JWZ.90Nov16173417@kolyma.lucid.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!unixhub!shelby!neon!lucid.com!jwz
References: <1990Nov15.101847.26285@diku.dk> <3904@s3.ireq.hydro.qc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!unixhub!shelby!neon!lucid.com!jwz
From: jwz@lucid.com (Jamie Zawinski)
Newsgroups: comp.lang.clos
Subject: CLOS/Flavors (was Re: Is CLOS Object-Oriented ???)
Message-ID: <JWZ.90Nov16173417@kolyma.lucid.com>
Date: 17 Nov 90 01:34:17 GMT
References: <1990Nov15.101847.26285@diku.dk> <3904@s3.ireq.hydro.qc.ca>
Sender: jwz@lucid.com
Organization: Lucid, Inc., Menlo Park, CA
Lines: 27
In-reply-to: gamin@ireq-robot.hydro.qc.ca's message of 15 Nov 90 22:12:34 GMT