emacs-devel
[Top][All Lists]
Advanced

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

Re: anaphora in emacs-lisp?


From: Richard Stallman
Subject: Re: anaphora in emacs-lisp?
Date: Sun, 10 Aug 2014 21:46:52 -0400

[[[ 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 via email to

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