by swatson741 on 5/28/25, 8:44 PM with 32 comments
by taeric on 5/30/25, 2:32 PM
by neilv on 5/30/25, 6:26 PM
(Also, there's a more general problem of newbies trying to use the most advanced tool they've been exposed to. Why use the standard `if` statement, when you can use a proprietary high-powered pattern-matching form, now backed by a networked Kubernetes cluster of deep learning and LLMs.)
In the Racket community, one of my many attempts to discourage mistaken uses of `eval`:
https://groups.google.com/g/racket-users/c/Z-IlF24RAKU/m/3h6...
In the all-in-one practitioner's book I was writing, eval wouldn't be introduced until almost the end, in the "Dangerous Last Resort" part of the book. (Maybe I should've planned a marketing gimmick around it, as "free bonus DLC", and you need to do some ritual to be a Certified Certifiable Racketeer, before you can read the eval secret scroll.)
by dang on 5/28/25, 8:47 PM
On eval in dynamic languages generally and in Racket specifically (2011) - https://news.ycombinator.com/item?id=8098569 - July 2014 (18 comments)
by programLyrique on 5/30/25, 5:04 PM
- in Javascript: https://link.springer.com/chapter/10.1007/978-3-642-22655-7_...
by behnamoh on 5/30/25, 2:01 PM
by TOGoS on 5/30/25, 4:04 PM
So on the less-well-defined end, you have something like JavaScript's `eval` function, in the middle you have lisp macros, which get an AST instead of just source code, and on the actually-pretty-well-defined end, you have a lambda that's already been parsed/compiled and just needs to be evaluated.
by kazinator on 5/31/25, 3:38 AM
eval can be sandboxed with a combination of multiple approaches, including validating the code, and evaluating it in a restricted environment in which only certain symbols exist. The full library package is not visible.