emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase defuns


From: Richard Stallman
Subject: Re: pcase defuns
Date: Tue, 21 Dec 2021 23:18:33 -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. ]]]

  > I agree that just implementing everything in a function is 
  > reasonable.  For that, just using pcase seems good enough, 
  > although it might be interesting to have a very different way of 
  > writing a function such as

  > (pcase-defun mytest
  >   "Demonstrates a way of writing defuns via pcase matching."
  >   ((a b _) "a b match")
  >   (`(c ,v _) (format "c %s match" v)))

This avoids the split-up-definition problems I was talking about,
since it is all in one place with one name.

Please make the defining form's name follow th convention of starting
with `def', so people and tools will recognize that it is a defining
form.

Also, why use `pcase' in the name?  According to the docs of `pcase',
this pattern matching is not similar.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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