emacs-devel
[Top][All Lists]
Advanced

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

Re: Shouldn't records be sequences?


From: Stefan Monnier
Subject: Re: Shouldn't records be sequences?
Date: Sun, 12 Apr 2020 12:30:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Records currently seem a bit weird: `aref', `cl-loop''s "across" clause
> (which uses `aref'), `copy-sequence' support them; `substring' (which
> does support vectors) and other sequence functions do not.

My opinion is that records are not sequences, just like C's `structs`
and Java's objects are not sequences (e.g. it doesn't make much sense to
concatenate records or to take subsequences of them).  Some of our
builtin functions operating on sequences also work on records, 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.


        Stefan




reply via email to

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