cl-destructuring-bind
was designed more or less specifically to destructure data made of cons cells. pcase-let
on the other hand is just a special case of pcase
which was designed to handle arbitrary data and be extensible (and be able to discriminate rather than only destructure).
So cl-destructuring-bind
has a slightly more concise syntax for the simple cases like the one you show, whereas pcase-let
imposes a more verbose syntax in exchange for the ability to destructure other data types such as structs, hash-tables, ...
Another difference is that pcase-let
allows you to perform several such bindings, as in
(pcase-let ((PAT1 EXP1)
(PAT2 EXP2)
...)
..)
whereas cl-destructuring-bind
focuses on the single-pattern case, so you'd have to use
(cl-destructuring-bind PAT1 EXP1
(cl-destructuring-bind PAT2 EXP2
...))
which again makes cl-destructuring-bind
less verbose in the simple case.
As the designer&implementer of pcase
I consider that the added verbosity cost of pcase-let
s generality is minor (compared to the advantage of having a single syntax of patterns that works both for simple and complex cases).