It does seem like a legitimate use for eval, at least at first glance.
The biggest problem is that using eval this way is really slow when
each rule is being tested on hundreds of inputs.

Interesting alternative, Konrad. I can probably take advantage of the
fact that all of the functions I'm calling (unchecked math and bitwise
operators) take exactly two arguments. I might give something like
that a try. I'd rather not though, if I can avoid it.

It seems like there ought to be a way to make a function out of a list
of symbols that would be a valid function body and then call it
repeatedly. I was playing around with that approach at first, but
never managed to get it right. I strongly suspect creating a function
once and calling it 400 times will be faster than calling eval 400
times.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to