Opened 9 years ago

Last modified 7 years ago

#1276 assigned defect

alist-lib alist-update!/default not useful for adding keys

Reported by: John Foerch Owned by: Peter Danenberg
Priority: minor Milestone: someday
Component: extensions Version: 4.10.x
Keywords: alist-lib Cc:
Estimated difficulty:

Description

I noticed that alist-update! and alist-update!/default in alist-lib have call signatures suggestive of being able to add keys to an alist (not just updating existing keys) because they accept a default OLD value if the given key is not found. However, both procedures have an unspecified return value, so it's not clear what the intent was for the case of adding new entries to the alist. If they don't return an updated reference to the head of the list, there is no way to add new entries, and it doesn't make sense to have a DEFAULT in the call signature.

Change History (2)

comment:1 Changed 9 years ago by John Foerch

Component: unknownextensions
Keywords: alist-lib added
Priority: majorminor

comment:2 Changed 7 years ago by sjamaan

Owner: set to Peter Danenberg
Status: newassigned
Note: See TracTickets for help on using tickets.