Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Because I'm loath to ask c.l.l

Name: Anonymous 2010-02-09 6:04

Can the macro body in define-method-combination access the arguments in which the generic function was called?

Name: Anonymous 2010-02-09 6:27

No.

Name: Anonymous 2010-02-09 6:28

Yes.

Name: Anonymous 2010-02-09 6:29

>>3
When is the macro body evaluated, then?

Name: Anonymous 2010-02-09 6:30

CLOS isn't my strong point, but usually you call the methods using call-method, which tries to hide such details from you, however I think it can be done in non-portable ways. It may also be possible to make this doable in a portable way via the MOP. Maybe someone else more knowledgeable about CLOS here can answer, or maybe you should actually ask c.l.l and some MOP expert like Pascal Constanza could give you a proper answer.

Name: Anonymous 2010-02-09 6:30

>>4
Which macro body?

Name: Anonymous 2010-02-09 6:31

>>6
The resulting one. Yeah, I'd ask a MOP expert.

Name: Anonymous 2010-02-09 6:41

Why not make a macro that does the checking automagically in the body of the method?

...yeah, dick move.

Name: Anonymous 2010-02-09 6:42

>>8
Because the function wouldn't be the same, then.

Name: Anonymous 2010-02-09 8:47

If the Sussman really lurked /prog/ now would be a great time to answer. I'm starting to think most of the people on c.l.l are psychopaths.

Name: Anonymous 2010-02-09 8:55

>>10
I somehow doubt the Sussman cares a lot about CLOS.
If you dislike c.l.l, you can ask on IRC, I've found it quite helpful when asking various specific CL questions, however I think OP's question might be better fitted for newsgroups than IRC for a variety of reasons(complexity, expected answer length, poster's knowledge about the subject, ...).

Name: >>5 2010-02-09 9:19

Hmm, I guess I learn something new each day:
define-method-combination name lambda-list (method-group-specifier*) [(:arguments . args-lambda-list)] [(:generic-function generic-function-symbol)] [[declaration* | documentation]] form*
Example usage: http://www.cawtech.demon.co.uk/clos/define-method-combination.html

I really ought to read a CLOS book these days, it seems rather neat.

Is this what you wanted OP?

Name: Anonymous 2010-02-09 10:39

Not quite. It turns out there's no way to get information on the current invocation because apparently caching effective methods is a big thing.

Name: Anonymous 2010-02-09 11:16

>>11
c.l.l has an IRC?

Name: Anonymous 2010-02-09 11:18

>>14
No, I meant #lisp on Freenode.

Name: Anonymous 2010-02-09 17:25

>>1
the arguments in which the generic function was called
Do you mean “with which”?

Name: Anonymous 2010-02-10 23:18

I just had a brilliant /prog/ idea - send the arguments along with a thunk.

Name: Anonymous 2010-12-06 9:22

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-10 6:14


Don't change these.
Name: Email:
Entire Thread Thread List