[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add cl-map-into, revision 2
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Add cl-map-into, revision 2 |
Date: |
Thu, 07 Oct 2021 12:00:17 +0300 |
> From: akater <nuclearspace@gmail.com>
> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
> Date: Thu, 07 Oct 2021 08:24:32 +0000
>
> > Is there any reasons you excluded other kinds of sequences (strings
> > and bool-vectors)?
>
> I forgot strings aren't vectors in Elisp (I rarely deal with vectors).
>
> Both strings and bool-vectors are arrays so I could simply replace
> vector with array wherever it matters. This would include char-tables
> too; I don't have experience with those.
char-tables are not simple arrays, so including them would be not
trivial, I think.
> But it is conceivale that Elisp might get arrays that are not sequences
> in the future. E.g. CL has multidimensional arrays. Elisp manual
> mentions “all [currently defind types of array are] one-dimensional” so
> the notion of multidimensional array is recognised already.
>
> It thus would be nice to have a special type for one-dimensional array.
> In CL, it's precisely “vector”.
>
> Anyway, I don't hope this type will appear soon so for the time being
> I'll just replace “vector” with “array”.
Actually, I think "sequence" is more general than "array" in Emacs
Lisp, because arrays cannot have their length changed.