Newsgroups: comp.lang.clos
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!europa.eng.gtefsd.com!darwin.sura.net!lhc!lhc!hunter
From: hunter@work.nlm.nih.gov (Larry Hunter)
Subject: Re: Syntax question
In-Reply-To: barmar@nic.near.net's message of 17 Oct 1994 12:46:45 -0400
Message-ID: <HUNTER.94Oct18091322@work.nlm.nih.gov>
Sender: news@nlm.nih.gov
Reply-To: Hunter@nlm.nih.gov
Organization: National Library of Medicine
References: <CHRISB.94Oct7112653@stork.cssc-syd.tansu.com.au>
	<JASON.94Oct11123703@wratting.harlqn.co.uk>
	<HUNTER.94Oct11105243@work.nlm.nih.gov> <37u9pl$15t@tools.near.net>
Date: 18 Oct 1994 13:13:22 GMT
Lines: 33


Barmar points out a problem with my suggestion for a CLOSy "Jack put the box
on the table": 

  Since CLOS doesn't support dispatching on optional arguments, that's *not*
  how one would do it in Lisp, unless PUT-ON is a non-generic wrapper
  function that simply calls a generic version (in order to provide a nicer
  API). 

Well, it IS lispy, but you are right, it's not very CLOSy.

 I think the intent of the original question was to see the interface to the
 generic function; there are lots of ways to add syntactic sugar.

Hmm, I thought the intent was to hint at the style used by "native speakers"
of the programming language in question.  How about:

 (make-instance 'put-on-event :actor JACK-13 :object BOX-27
                :to-location TABLE-01)

I was just suggesting something that looked more like slot/filler notation
and gensym'ed objects might be appropriate to characterize lisp/clos.

Larry
--
Lawrence Hunter, PhD.
National Library of Medicine
Bldg. 38A, 9th floor
Bethesda. MD 20894 USA
tel: +1 (301) 496-9300
fax: +1 (301) 496-0673 
internet: hunter@nlm.nih.gov
encryption: RIPEM via server; PGP via "finger hunter@work.nlm.nih.gov"
