all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Huchler <stefan.huchler@mail.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Strange eval behaviour
Date: Wed, 23 Nov 2016 10:19:46 +0100	[thread overview]
Message-ID: <8760ney2ml.fsf@web.de> (raw)
In-Reply-To: <878tsbxe40.fsf@mail.de> (Stefan Huchler's message of "Wed, 23 Nov 2016 00:57:03 +0100")

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	other threads:[~2016-11-23  9:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-13 21:28 Strange eval behaviour Stefan Huchler
2016-11-14 15:04 ` Stefan Monnier
2016-11-15  1:55   ` Stefan Huchler
2016-11-18  2:38     ` Michael Heerdegen
2016-11-18 16:51       ` Stefan Huchler
2016-11-18 23:19         ` Michael Heerdegen
2016-11-22 23:57           ` Stefan Huchler
2016-11-23  9:19             ` Michael Heerdegen [this message]
2016-11-23 14:20               ` Stefan Huchler
2016-11-18 17:00       ` Stefan Huchler
2016-11-18 23:35         ` Michael Heerdegen
2016-11-22 14:43           ` Stefan Huchler
2016-11-27  4:25           ` Stefan Huchler
2016-11-27  4:29           ` Stefan Huchler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760ney2ml.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=stefan.huchler@mail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.