Eval is not Evil
The ability to compile and run code assembled at run-time is useful.
Here is an example use of eval
in Janet.
(defmacro match? [value pattern]
~(match ,value ,(eval pattern) true false))
(def p0 '[:a _])
(pp (match? [:a :b] p0)) # true
(def p1 '[:b _])
(pp (match? [:a :b] p1)) # false