[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62067: 29.0.60; 'map-insert' implementation for lists is problematic
From: |
Augusto Stoffel |
Subject: |
bug#62067: 29.0.60; 'map-insert' implementation for lists is problematic |
Date: |
Thu, 09 Mar 2023 08:48:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Consider, for instance:
(map-insert '(:a 1) :a 2)
=> (:a 2 :a 1)
This result will confuse users and other libraries:
(json-encode (map-insert '(:a 1) :a 2))
=> "{\"a\":2,\"a\":1}"
Not even map.el can really handle these return values correctly:
(let (x)
(map-do (lambda (k v) (if (eq k :a) (setq x v)))
(map-insert '(:a old) :a 'new))
x)
=> old
The alist implementation has similar issues.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#62067: 29.0.60; 'map-insert' implementation for lists is problematic,
Augusto Stoffel <=