[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: quasiquote in a class definition
At 20:36 -0400 2000-10-24, Shriram Krishnamurthi wrote:
>That's because the method's value is captured at the time when you
>create the association list.
>
>In general, I don't think you want to be writing code like this at
>all. This doesn't seem to be a good use of an association list (and,
>consequently, of quasiquote). If you think about it, an object itself
>is a kind of association list between names and fields/methods. So
>why not just use an object instead?
One other point: there's nothing magic about quasiquote. Replace:
[command_list `((output_coords ,output_coords))]
with:
[command_list (list ('output_coords output_coords))]
Notice that the error doesn't change.
HTH,
john
ps.: shriram's right that an object is a kind of association between
names and methods. If what you want is an association between
_symbols_ and methods, there's always "ivar/proc".