[Top][All Lists]

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

Re: New jrpc.el JSONRPC library

From: Stefan Monnier
Subject: Re: New jrpc.el JSONRPC library
Date: Wed, 23 May 2018 22:07:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>    (cl-destructuring-bind (&key _boring-key very-important)
>        '(:very-important 42 :boring-key 92)
>        very-important)

FWIW, we could of course do a (pcase-defmacro cl (...) ...) such that

    (cl-destructuring-bind PAT VAL EXP)

can be written

    (pcase-let (((cl PAT) VAL)) EXP)

This is the only significant advantage of pcase patterns: they're
extensible, whereas CL's destructuring patterns are not.

CL's destructuring patterns in return have the advantage of being
available in cl-defmethod whereas there's no pcase-defmethod (yet?).

With respect to the support for "default" and "provided-p" thingies, as
recently mentioned elsewhere I prefer designs where we avoid
distinguishing nil from "absent", so I rarely if ever need them.

But of course, distinguishing nil from "absent" also comes with
advantages, so it's just the usual style tradeoffs: If you're used to
one style the other looks inconvenient.

IOW, it's another bikeshed color.


reply via email to

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