[Openmcl-devel] name (string) to function

Stas Boukarev stassats at gmail.com
Fri Dec 3 23:36:01 PST 2010


Taoufik Dachraoui <dachraoui.taoufik at gmail.com> writes:

> I found another way 
>
>
> (defun f (string)
>   (read-from-string (format nil "(function ~A)" string)))
>
> I am interested  to know the pros and cons of using read-from-string
> and to compare this to your code
>
read-from-string interns symbol, which may be undesirable, and it can
execute arbitrary code, so you need to bind *read-eval* to nil.

-- 
With Best Regards, Stas.



More information about the Openmcl-devel mailing list