[Top][All Lists]

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

Re: Merging nth, aref, and elt.

From: Stefan Monnier
Subject: Re: Merging nth, aref, and elt.
Date: Fri, 31 Oct 2014 23:19:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> But note that (get not-necessarily-symbolp-obj 0) has a gotcha: for
> sequences 0 means the first object when iterating, for hashes and
> symbols it means the value of the mapping at the object which
> represents the integer 0 (which happens to be unique in Lisp).  So
> it's potentially ambiguous.

I don't see any ambiguity there: sequences are mappings from integers
to objects.  There are ambiguities tho if we try to use `get' for
everything like hash tables, array, lists, symbol properties, window
parameters, buffer-local variables, object fields, ...:
- we can't reliably distinguish a list from an alist.
- we can't reliably distinguish a defstruct object from an array.


reply via email to

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