From: Alex Young Date: 2007-03-29T18:27:09+09:00 Subject: Re: general question (different between methods and functions)? David Vallner wrote: > Alex Young wrote: >> I think of them like this: >> >> - A method is a message to which an object responds. >> [snip] >> By this definition, it is possible for an (object,message) pair to be >> viewed as a function. > > Of course, the very existence of CLOS makes this definition a little > vague. Since then, it would be the tuple of a "message" and all the > objects (values really) it's "sent to" (which, in CLOS, it quite isn't, > since IIRC, the multiple-dispatch mechanism doesn't have to use the most > specific class of either argument if it wouldn't lead to a match), and > things go all manners of pear-shaped, making a method really only a > tuple of a message name and its arguments, where I can't really see the > distinction between that and a function name and its arguments. (Based > on your definition only.) Absolutely agreed. "Method" and "function" needn't be (and as you've shown, aren't) exclusive terms. -- Alex