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

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

Re: random predicate function


From: Pascal J. Bourguignon
Subject: Re: random predicate function
Date: Wed, 15 Dec 2010 18:28:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Wed, 15 Dec 2010 16:20:05 +0100 "Pascal J. Bourguignon" 
> <pjb@informatimago.com> wrote: 
>
> PJB> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> I agree the CL macros are nicer, but the non-macro version is much
>>> easier to debug *in GNU Emacs* and it's already installed.  So they both
>>> have benefits.
>
> PJB> I don't see how code without macros is easier to debug, there are so
> PJB> many macros in lisp code.
>
> We're talking about GNU Emacs specifically.  Have you debugged macros
> there?  They are definitely not as intuitive as functions in the debugger.

Only if you don't understand that lisp macros are exactly the same as
lisp functions.

For any macro (defmacro m (args...) body...)
you can write a function (defun m* (args...) body...)
and replace the macro by (defmacro m (args...) (m* args...))
Such a macro is trivial to debug: it just calls a single function!

Therefore macros are as easy as functions to debug.


So, no, I'm sorry, but I never observed any difference between debugging
of macros or functions.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


reply via email to

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