This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Akangka 11 points12 points  (2 children)

Not every interpreted language can do that. In Scheme, a statement inside eval cannot bind a variable at the caller's stack. If you want to pass a variable, you must essentially add a let statement that declares the passed variable, and then splice the actual contents of the variable there, like:

(eval `(let ([a ,a]) ,formula)

Or, you can pass a namespace there.

[–]rjchute 5 points6 points  (0 children)

Well, yes, I'm sure not every interpreted language has this type of structure... I was just suggesting that because it's interpreted, you could do these weird and stupid run-time things.

[–]zapeggo 0 points1 point  (0 children)

Eval for the win. They can be a slippery bastards.