all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Improving aesthetics & readability of backquote
Date: Sun, 19 May 2019 23:38:38 -0400	[thread overview]
Message-ID: <jwv36l9ztzd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: m28sv1omiu.fsf@paulwrankin.com

> Then it would be a case of augmenting the "unquote" ,VAR and "splice" ,@VAR
> reader constructs:
>
>    (quoteval (1 2 (unquote a) 5 (splice b) 8 ))
>    -> (1 2 (3 4) 5 6 7 8)

You'd feel quite at home in Scheme where the reader's

    'E  =>  (quote E)
    
is complemented by

    `E  =>  (quasiquote E)
    ,E  =>  (unquote E)
    ,@E =>  (unquote-splicing E)

Elisp doesn't have that, mostly for historical reasons, I think.
I haven't been able to confirm it, but I believe the road looked like:
the Elisp reader originally only had the `quote` special element and
since people don't like to write (backquote (foo bar (unquote baz))),
they started writing (` (foo bar (, baz))) which was at least vaguely
reminiscent of the "normal" backquote/unquote used in other Lisps.
This is the "old-style" quotes.  When the new-style quotes were added
to the reader (those that look like regular Lisp) it was natural to map

    `E  =>  (` E)

so that the existing definition of the ` macro worked both with the new
and with the old syntax.


        Stefan




  reply	other threads:[~2019-05-20  3:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20  3:03 Improving aesthetics & readability of backquote Paul W. Rankin
2019-05-20  3:38 ` Stefan Monnier [this message]
2019-05-22 15:44   ` Stefan Monnier
2019-05-20  8:52 ` Alan Mackenzie
2019-05-20 13:25   ` Paul W. Rankin
2019-05-20 14:02     ` Alan Mackenzie
2019-05-20 14:26       ` Paul W. Rankin
2019-05-20 16:08         ` Ken Olum
2019-05-20 23:19   ` Richard Stallman
2019-05-21  2:06     ` Paul W. Rankin
2019-05-21  2:22       ` Noam Postavsky
2019-05-21  2:39         ` Paul W. Rankin
2019-05-21 20:19       ` Richard Stallman
2019-05-22  2:46         ` Paul W. Rankin
2019-05-22  7:56           ` Eli Zaretskii
2019-05-22  8:55             ` Paul W. Rankin
2019-05-22 15:57               ` Michael Heerdegen
2019-05-22 16:13                 ` 조성빈
2019-05-22 16:13               ` Michael Heerdegen
2019-05-22 22:40               ` Richard Stallman
2019-05-20  8:59 ` Lars Ingebrigtsen
2019-05-20 13:35   ` Paul W. Rankin
2019-05-20 13:47     ` Basil L. Contovounesios
2019-05-20 14:18       ` Paul W. Rankin
2019-05-20 14:48         ` Basil L. Contovounesios
2019-05-20 15:25     ` Lars Ingebrigtsen
2019-05-20 23:21       ` Richard Stallman
2019-05-21  2:34         ` Paul W. Rankin
2019-05-22 16:14 ` Sam Steingold

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=jwv36l9ztzd.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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.