Early last year, I wrote about John Wiegley’s excellent tutorial on pcase. This tweet from Bozhidar Batsov:
pcase and pcase-let are so insanely powerful, but few #Emacs hackers know how to use them. Read this great article! https://t.co/87n9civ3Y8
— Bozhidar Batsov (@bbatsov) April 15, 2017
reminded me of Wiegley’s post and inspired me to revisit it. It really is excellent and if you do any Elisp programming you should definitely take a look at it.
Recently, Wilfred Hughes published a great post on Pattern Matching in Emacs Lisp in which he compares pcase.el
with cl.el
, dash.el
, and shadchen
for a variety of use cases. You can follow the link to see what conclusions he arrived at.
If your work occasionally requires pattern matching of some sort, you should definitely read these two posts. The pcase
family, in particular, is very powerful and allows you to write concise code for matching patterns.