all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Josh <josh@foxtail.org>
Cc: nferrier@ferrier.me.uk, emacs-devel@gnu.org
Subject: Re: anaphora in emacs-lisp?
Date: Sun, 10 Aug 2014 21:46:52 -0400	[thread overview]
Message-ID: <E1XGehI-0003ug-Cq@fencepost.gnu.org> (raw)
In-Reply-To: <CANdFEAG67H_Ez78-BjU1KNnaXJiyuszwk8gxes4tLDkrStoMFQ@mail.gmail.com> (message from Josh on Sun, 10 Aug 2014 16:18:25 -0700)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    It sounds like Nic is proposing something much like what I did last
    year[0], for much the same reasons.

That text doesn't directly tell me what the feature is.  (I could send
mail to fetch the page, but that would delay my response till
tomorrow.)

Fortunately, Nic was more directly explicit:

    aif, awhen, acond - decision macros that capture the value of the test
    expression in the variable "it" for use later in the body.

In principle, such features are desirable, but the syntax tends to be
either inelegant or clumsy.  If the variable gets a fixed name, it is
inelegant; if you specify the name, it does not save you much.  If the
variable is always called 'it', that's the inelegant variety.
`when-let' is an example of the variety that doesn't save you much.

Also, names such as 'aif' are unhelpful.  Only people who have studied
linguistics know what "anaphora" means, and nobody will guess what the
'a' stands for.

If they were called 'if-it', 'when-it', and 'cond-it', they would be a
little less inelegant, because the variable name to be bound appears
visibly (albeit in the name of the macro).  Also, these names would
suggest what the constructs do.  So these names are much better.

If we have these, we should also have 'unless-it' and 'case-it'.


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




  reply	other threads:[~2014-08-11  1:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 20:29 anaphora in emacs-lisp? Nic Ferrier
2014-08-09  2:57 ` Thien-Thi Nguyen
2014-08-09 12:58 ` Stefan Monnier
2014-08-09 17:24 ` Richard Stallman
2014-08-10 23:18   ` Josh
2014-08-11  1:46     ` Richard Stallman [this message]
2014-08-11  7:09       ` David Kastrup
2014-08-13  3:55         ` Richard Stallman

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=E1XGehI-0003ug-Cq@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=josh@foxtail.org \
    --cc=nferrier@ferrier.me.uk \
    /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.