[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New jrpc.el JSONRPC library
From: |
Aaron Ecay |
Subject: |
Re: New jrpc.el JSONRPC library |
Date: |
Mon, 21 May 2018 14:30:59 +0100 |
User-agent: |
Notmuch/0.26 (https://notmuchmail.org) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
Hi João,
One small remark:
2018ko maiatzak 20an, João Távora-ek idatzi zuen:
[...]
>> - Please use hashtables or alists instead of plists. There are many
>> more functions to operate on hashtables and alists,
>
> Maybe. Hmm, I really really don't know about this. Have you tried
> cl-destructuring-bind with plists? It really is the SH&T for JSON.
You can use pcase-let* and the ‘map’ pcase pattern (from the built-in
map.el) as a substitute when working with alists and hash tables. IOW,
the following two code snippets are equivalent:
(pcase-let* (((map foo bar) '((foo . 1) (bar . 2))))
(+ foo bar))
(cl-destructuring-bind (&key foo bar) '(:foo 1 :bar 2)
(+ foo bar))
--
Aaron Ecay
- Re: New jrpc.el JSONRPC library, (continued)
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library, Clément Pit-Claudel, 2018/05/20
- Re: New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot), Philipp Stephani, 2018/05/19
- Re: New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot), Eli Zaretskii, 2018/05/19
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library, Eli Zaretskii, 2018/05/20
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/20
- Re: New jrpc.el JSONRPC library,
Aaron Ecay <=
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/21
- Re: New jrpc.el JSONRPC library, Aaron Ecay, 2018/05/21
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/21
- Re: New jrpc.el JSONRPC library, Aaron Ecay, 2018/05/23
- Re: New jrpc.el JSONRPC library, Stefan Monnier, 2018/05/23
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/23
- Re: New jrpc.el JSONRPC library, Stefan Monnier, 2018/05/23
- Re: New jrpc.el JSONRPC library, Stefan Monnier, 2018/05/21
- Re: New jrpc.el JSONRPC library, Philipp Stephani, 2018/05/24
- Re: New jrpc.el JSONRPC library, João Távora, 2018/05/24