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

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

RE: [External] : Re: Why is defun not executed during load-file?


From: Drew Adams
Subject: RE: [External] : Re: Why is defun not executed during load-file?
Date: Mon, 31 May 2021 02:05:25 +0000

> >> Macros are much more difficult to debug...
> >
> > `macroexpand` and `macroexpand-1` are your friends.
> 
> Also, writing macros compared to writing functions typically
> involves more bugs...

Why do you think so?

Most users write far fewer macros than functions.
A relative lack of familiarity/practice might
facilitate introduction of bugs.  IF what you
claim is true.  But what evidence is there?

Writing code that creates code is its own thing,
granted - it's a bit particular.  But if you did
that as often as you write typical defuns I'm
guessing you'd introduce about the same number
of bugs.

So yes, if "typically" one doesn't write macros
then writing macros will perhaps "typically"
involve more bugs.

But a little perspective hints that there's
nothing inherently buggy about writing macros.
Is it harder to ride a bike than to skateboard?
Depends on how used to each you are.



reply via email to

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