[Openmcl-devel] Fwd: [Clozure CL] #546: key args listing don't show
Joakim Sandgren
joakim at joakimsandgren.com
Fri Jun 19 08:15:01 PDT 2009
I retry then.
Joakim
Début du message réexpédié :
> De : Joakim Sandgren <joakim at joakimsandgren.com>
> Date : 19 juin 2009 17:02:05 HAEC
> À : openmcl-trac at clozure.com
> Cc : Gary Byers <gb at clozure.com>
> Objet : Rép : [Clozure CL] #546: key args listing don't show
>
> This is true and make sens. But this was the beahvior in MCL. Before
> I try to have an opinion here I dont have your example (defgeneric
> draw-character ((c character) (s view) &key font color)) to work. It
> gives me
>
> > Error: Bad generic function lambda list: ((C CHARACTER) (S VIEW)
> &KEY FONT COLOR)
> > While executing: CCL::CHECK-GENERIC-FUNCTION-LAMBDA-LIST, in
> process Listener(6).
> > Type cmd-. to abort, cmd-\ for a list of available restarts.
> > Type :? for other options.
>
> or another
> > Error: Bad generic function lambda list: ((TRUC LIST) &KEY FLUP
> FLOP)
> > While executing: CCL::CHECK-GENERIC-FUNCTION-LAMBDA-LIST, in
> process Listener(6).
> > Type cmd-. to abort, cmd-\ for a list of available restarts.
> > Type :? for other options.
>
> or even
> > Error: Bad generic function lambda list: ((TRUC LIST) (TRUC2
> NUMBER))
> > While executing: CCL::CHECK-GENERIC-FUNCTION-LAMBDA-LIST, in
> process Listener(6).
> > Type cmd-. to abort, cmd-\ for a list of available restarts.
> > Type :? for other options.
>
> the only defgeneric arglist I have working is without specialized
> arguments or with only &key (that do print the names in the
> echoarea) or &rest argument.
>
> enlighten me please.
>
> sincerely
> Joakim
>
> Le 19 juin 09 à 16:11, Clozure CL a écrit :
>
>> #546: key args listing don't show
>> -----------------------
>> +----------------------------------------------------
>> Reporter: josa1965 | Owner:
>> Type: defect | Status: closed
>> Priority: normal | Milestone:
>> Component: IDE | Version: 1.3
>> Resolution: invalid | Keywords:
>> -----------------------
>> +----------------------------------------------------
>> Changes (by gb):
>>
>> * status: reopened => closed
>> * resolution: => invalid
>>
>> Comment:
>>
>> Are you really talking about the case where a generic function has no
>> specialized arguments but accepts &key ?
>>
>> In the general case (where a generic function accepts at least one
>> required/specializable argument and its methods accept &key
>> arguments),
>> the generic function's lambda list merely contains &key; individual
>> methods can accept different sets of keywords, and it's not
>> meaningful or
>> useful to say that the generic function accepts a particular set of
>> keyword arguments (what arguments are actually accepted
>> depends on what methods are applicable.)
>>
>> It's sometimes useful to declare that (all methods on) a particular
>> generic function will accept (at least) a particular set of keyword
>> arguments:
>>
>> {{{
>> (defgeneric draw-character ((c character) (s view) &key font color))
>> }}}
>>
>> so it's meaningful to say that "the arglist of the function DRAW-
>> CHARACTER
>> is (c s &key font color)", even though it's possible to define
>> methods
>> that accept additional keyword arguments. Without the DEFGENERIC,
>> it's
>> not really meaningful.
>>
>> In the case where only a single method is defined on a generic
>> function
>> (and in your specializer-less example, only a single primary method
>> can
>> ever be defined) we ''could'' conceivably say that the generic
>> function's
>> arglist is the sole method function's arglist, but (except in the
>> specializer-less case) that'd mean that the generic function's
>> arglist
>> would change as soon as a second method was defined.
>>
>> If it's meaningful to talk about the set of keyword arguments
>> accepted by
>> a generic function, then the only way to define that set is to use
>> DEFGENERIC (or the functional MOP equivalent.)
>>
>> --
>> Ticket URL: <http://trac.clozure.com/openmcl/ticket/546#comment:5>
>> Clozure CL <http://trac.clozure.com/openmcl>
>>
>
>
>
>
> Joakim Sandgren
> joakim sandgren musik
> 42, rue de Maubeuge
> 75009 Paris
> France
> +33 (0)1 45 26 43 90
> info at joakimsandgren.com
> http://www.joakimsandgren.com
>
Joakim Sandgren
joakim sandgren musik
42, rue de Maubeuge
75009 Paris
France
+33 (0)1 45 26 43 90
info at joakimsandgren.com
http://www.joakimsandgren.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090619/66052353/attachment.htm>
More information about the Openmcl-devel
mailing list