emacs-devel
[Top][All Lists]
Advanced

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

Re: Improving aesthetics & readability of backquote


From: Ken Olum
Subject: Re: Improving aesthetics & readability of backquote
Date: Mon, 20 May 2019 12:08:22 -0400

There is a Lisp standard.  I think we should not get further from Common
Lisp by inventing new syntax, especially for low-level functionality
that isn't related to anything special about emacs.

I think the advantage of ` and , is that they allow the code that the
macro will produce to be clearly visible.  Thus

(defmacro 2+ (x)
  `(+ ,x 2))

looks a lot like

(defun 2+ (x)
  (+ x 2))

These two definitions do something very similar in terms of the effect
of the object being defined when it appears in code, so I think it's
good that they look similar.

(defmacro 2+ (x)
  (quoteval (+ (unquote x) 2)))

puts the focus on the operation of the macro expanding function, rather
than on the code that is generated, i.e., on how the macro works rather
than what it does.  I think it's better to see the resulting form more
clearly.

                                        Ken



reply via email to

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