[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shouldn't records be sequences?
From: |
Clément Pit-Claudel |
Subject: |
Re: Shouldn't records be sequences? |
Date: |
Sun, 12 Apr 2020 12:46:07 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 12/04/2020 12.30, Stefan Monnier wrote:
> but that's only motivated by the need for backward compatibility with
> code which used to expect `cl-defstruct` to use vectors instead of
> records.
Isn't performance part of it too? A recent example: I have a list of records
that I display to users, using a custom sort order (a list of record fields).
It's convenient to be able to go from list of fields to list of array offsets
once, and then use those offsets in the comparison function (this is similar to
what I'd do with C structs).