[Top][All Lists]

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

Re: Improving aesthetics & readability of backquote

From: Paul W. Rankin
Subject: Re: Improving aesthetics & readability of backquote
Date: Tue, 21 May 2019 12:34:45 +1000
User-agent: mu4e 1.2.0; emacs 26.2

On Tue, May 21 2019, Richard Stallman wrote:

,@b is obviously something magic; people who don't know what it does will look up what it means.

(splice b) looks like an expression, so people will assume it calls the function 'splice', and get confused. I think we should not implement that alias.

I think it would be a worthwhile experiment to run this theory by a non-programmer, or a non-Lisp programmer, because this is just not how people think. This distinction between "expression" and "function" and "construct"... people who haven't spent most of their lives programming Lisp just don't think in those terms. Instead we think of the first element inside parentheses as "this does a thing". We look at something like the above and think "splice does a thing". The notion that confusion will arise because (splice b) can only be called within a (quoteval ...), and that this confusion will supersede the confusion of "what the heck is ,@b??" is just not realistic.

And there are many times when the first element inside parentheses actually does *not* do a thing, e.g.

   (let ((a 1) (b 2)) ...)    ;; a and b don't do things

   (dolist (var list) ...)    ;; var doesn't do a thing

But "quoteval", "unquote" and "splice" are just suggestions based on the backquote documentation. If these suggestions are too troubling, maybe divide this into two parts: 1. the backquote syntax is ugly and hard to understand, and 2. here's a way it could be better. Feel free to discard 2.


reply via email to

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