[racket] Sending a method as a symbol

From: Grant Rettke (grettke at acm.org)
Date: Tue Nov 15 15:14:04 EST 2011

On Mon, Nov 14, 2011 at 8:32 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sun, 13 Nov 2011 21:00:55 +0000, "nicolas.oury at gmail.com" wrote:
>> Is there a function to send to a class with a dynamic symbol instead of a
>> static one?
>>
>> As in (send .... 'method-name)
>
> I'll look into this more, but you can write
>
>  (send-generic o (make-generic (object-interface o) 'method-name) arg ...)
>
> which suggests that there really should be a variant of `send' that
> works with symbolic method names.

That is like eval but for talking to objects?



Posted on the users mailing list.