all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: "João Távora" <joaotavora@gmail.com>,
	"Philipp Stephani" <p.stephani2@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	monnier@iro.umontreal.ca, vibhavp@gmail.com, emacs-devel@gnu.org
Subject: Re: New jrpc.el JSONRPC library
Date: Mon, 21 May 2018 14:30:59 +0100	[thread overview]
Message-ID: <87d0xp5e5o.fsf@gmail.com> (raw)
In-Reply-To: <87d0xqs56o.fsf@gmail.com>

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



  parent reply	other threads:[~2018-05-21 13:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 22:34 [ELPA] New package: eglot João Távora
2018-05-11  6:19 ` Eli Zaretskii
2018-05-11 11:29   ` João Távora
2018-05-11 12:15     ` Eli Zaretskii
2018-05-18 16:27   ` New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot) João Távora
2018-05-19  8:46     ` Eli Zaretskii
2018-05-20 15:54       ` New jrpc.el JSONRPC library João Távora
2018-05-20 16:02         ` Eli Zaretskii
2018-05-29  1:08           ` João Távora
2018-06-28 12:13           ` [PATCH] jsonrpc.el João Távora
2018-06-28 13:18             ` Eli Zaretskii
2018-06-28 13:23               ` João Távora
2018-06-28 13:40                 ` Eli Zaretskii
2018-05-20 19:13         ` New jrpc.el JSONRPC library Clément Pit-Claudel
2018-05-20 20:35           ` Josh Elsasser
2018-05-20 23:22             ` João Távora
2018-05-21  3:32               ` Josh Elsasser
2018-05-20 23:11           ` João Távora
2018-05-21  0:14             ` Clément Pit-Claudel
2018-05-19 11:34     ` New jrpc.el JSONRPC library (Was: [ELPA] New package: eglot) Philipp Stephani
2018-05-19 14:11       ` Eli Zaretskii
2018-05-20 15:43       ` New jrpc.el JSONRPC library João Távora
2018-05-20 16:06         ` Eli Zaretskii
2018-05-20 16:18           ` João Távora
2018-05-21 13:30         ` Aaron Ecay [this message]
2018-05-21 13:43           ` João Távora
2018-05-21 14:37             ` Aaron Ecay
2018-05-21 19:06               ` João Távora
2018-05-23 17:57                 ` Aaron Ecay
2018-05-23 18:02                   ` Stefan Monnier
2018-05-23 20:40                   ` João Távora
2018-05-24  2:07                     ` Stefan Monnier
2018-05-21 14:42             ` Stefan Monnier
2018-05-24 10:02         ` Philipp Stephani
2018-05-24 17:25           ` João Távora
2018-05-12 15:47 ` [ELPA] New package: eglot Stefan Monnier
2018-05-14 10:55   ` Bozhidar Batsov
2018-05-14 14:14   ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0xp5e5o.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=p.stephani2@gmail.com \
    --cc=vibhavp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.