emacs-devel
[Top][All Lists]
Advanced

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

Using "pcase" as part of names is inhelpful.


From: Richard Stallman
Subject: Using "pcase" as part of names is inhelpful.
Date: Sat, 09 Dec 2017 17:00:58 -0500

[[[ 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. ]]]

The construct 'pcase' uses patterns to test and destructure
objects while selecting among various cases.

Now we are adding other constructs that use patterns to destructure
objects.  These constructs have nothing to do with selecting among
cases.  Thus, 'pcase' in their names makes for misleading names.
The only part of the name 'pcase' that refers to the use of
patterns is the letter 'p'.

Referring users to 'pcase' to understand the use of patterns is
unhelpful since 'pcase' includes conceptual complexity (about cases)
that isn't present in the new constructs.

We should give the new constructs names that fit them without a
distracting element.  What would be good new names?

We could use 'plet' and 'plambda'.  Or 'pattern-let' and 'pattern-lambda'.

We could follow the example of Common Lisp 'destructuring-bind', to
create 'destructuring-let' and 'destructuring-lambda'.

Let's mark the old names 'pcase-...' obsolete so that they won't build
up in Lisp code.
-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.




reply via email to

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