[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a way to instrument for edebug a form (say, a progn) given
From: |
Stefan Monnier |
Subject: |
Re: Is there a way to instrument for edebug a form (say, a progn) given to `eval'? |
Date: |
Sat, 02 Jan 2016 12:39:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> "[...] a program that uses eval. It can't be compiled and optimized as well
> as the earlier paragraph, and the language context in which it is run
> may change the result."
The reason why it can't be compiled/optimized is that it's very
difficult to analyze/understand precisely what can happen.
And this difficulty doesn't only apply to automated tools like
compilers/optimizers but also to humans. Basically, when execution gets
to "eval" *anything* can happen. So modifying code that uses "eval"
without affecting its behavior is terribly difficult.
So it makes for code that's difficult to maintain. There are cases
where "eval" is just what you need, of course, but you should keep in
mind that it's too powerful to use it in cases where something else
would work as well.
Stefan