help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange eval behaviour


From: Michael Heerdegen
Subject: Re: Strange eval behaviour
Date: Wed, 23 Nov 2016 10:19:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Stefan Huchler <stefan.huchler@mail.de> writes:

> If code only throughs errors when you bytecompile it but not when you
> evaluate it, or run it, its hard to find the error. Aperently that
> happens with such macros like function*?

What do you mean specifically?

Of cause can running code produce errors.  The compiler does some
analysis of the code and helps you to discover potential problems, like
typos, or function calls with an invalid number of arguments.  This
makes it much easier to detect such problems, contrary to running that
code and then debugging it.

With respect to the environment (which functions and macros are defined,
which libraries are loaded, etc), of cause the Lisp evaluator doesn't
check if evaluating the same code in a different Emacs session could
potentially error.  Apart from the fact that it would slow down running
code, it would not make any sense because it is impossible to do in
general.  The compiler OTOH has the means (and the time) to do some
checks.  Since compiling your code will be part of your working style,
that is hardly a problem.  On the contrary, you'll see that it's a big
help that the compiler catches most common errors without the need to
run your code.


Regards,

Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]