[racket] Use of map and eval to evaluate symbol in namespace

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Mon Aug 4 02:12:17 EDT 2014

Henry Lenzi wrote at 08/03/2014 11:52 PM:
> What I'm sensing is that you seem to be concerned about bugs with
> Racket Scheme's EVAL. Is that it?
> I do not understand what the problem with EVAL is. Would you please
> state clearly what the problems are?

Eval is one of the issues.  Sorry I have to be very brief right now, but 
a few problems with eval in general are:
* Prevents much static checking.
* Likely increased difficulty debugging.
* Often executes arbitrary code with privileges, which might be 
corrupted due to accident or attack, which can be very bad.
* Prevents some optimization.
* Crutch that prevents learning better idioms.

Also, things like reading in a code file and looking for markers in it 
is something we sometimes do (especially in, say, Emacs editing mode, in 
which likely oopses are not so grave), but failure-prone.

Also, the code I saw was not idiomatic in, say, how it uses globals.

Anyway, it's good that Racket lets people experiment this way.  The 
concern I have in my mind is that newbies reading language forums often 
get ideas about idiomatic programming from examples they see, and even 
copy&adapt examples they see (maybe even evolving it into production 
code, or blogging it where other newbies pick up on it...).  People 
should experiment as much as they liked, but I think it would be good to 
if newbies knew when something they're looking at is an experiment 
rather than (yet) considered best practice.

I appreciate your participation in the community, and your experimenting.

Neil V.


Posted on the users mailing list.