Subject: Re: How to find a procedure given a symbol or string From: dmahler@xxxxxxxxxx Date: Thu, 29 Jul 1999 06:26:46 -0500 (CDT) |
On Thu, 29 Jul 1999, Brandon Ibach wrote: > Quoting dmahler@xxxxxxxxxx <dmahler@xxxxxxxxxx>: > > What you need is eval, > > (define (string->procedure name) > > (eval (string->symbol name))) > > > > then you can do > > ((string->procedure name) arg1 arg2 ...) > > or > > (apply (string->procedure name) arglist) > > if you have the arguments in a list. > > > Sadly, DSSSL lacks this construct. Perhaps not so sad, though. > I've always been wary of such constructs, as I feel that allowing > programs to write and execute new code on the spot can be a very > dangerous thing, and often (but not always) lends itself to abuse in > the form of use where the problem could be better solved via more > traditional approaches. > > -Brandon :) > If DSSSL does not reify the symbol table, then one must explicitly maintain the association between the relevant procedures and their names. Daniel > > DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist > DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: How to find a procedure given a, Brandon Ibach | Thread | Re: How to find a procedure given a, Brandon Ibach |
Re: How to find a procedure given a, Toby Speight | Date | Re: Again with the System Identifie, Toby Speight |
Month |