unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Matt <matt@excalamus.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Navigating Lisp data structures
Date: Mon, 05 Dec 2022 01:46:20 +0100	[thread overview]
Message-ID: <875yeqfyte.fsf@fastmail.fm> (raw)
In-Reply-To: <184de82cf09.eebfb5c8843687.6482234845227025147@excalamus.com>


On Sun, Dec 04 2022, Matt wrote:

> I'm obviously looking at the problem through the lens of Python key-value
> structures. When I try to translate the data structure to something like
> nested plists, it feels messy. Maybe that's me simply being uncomfortable with
> nested lists? When I mix list types (e.g. an alist of plists), the lookup
> syntax becomes inconsistent (a mix of assocs and plist-gets, scattered with
> cars and cdrs

Note that there's also `alist-get`, which should at least help in reducing the
number of cars and cdrs.

You may also want to check out `let-alist`, which actually gives a nice way to
access the elements inside a nested alist.


-- 
Joost Kremers
Life has its moments



  reply	other threads:[~2022-12-05  0:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04 19:00 Navigating Lisp data structures Matt
2022-12-05  0:46 ` Joost Kremers [this message]
2022-12-06 15:36   ` Matt
2022-12-05  2:05 ` Eric Abrahamsen
2022-12-07  4:06   ` Matt
2022-12-07 18:01     ` Eric Abrahamsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=875yeqfyte.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=help-gnu-emacs@gnu.org \
    --cc=matt@excalamus.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).