Opened 20 months ago

Last modified 3 months ago

#1276 assigned defect

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

Reported by: retroj Owned by: klutometis
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 20 months ago by retroj

  • Component changed from unknown to extensions
  • Keywords alist-lib added
  • Priority changed from major to minor

comment:2 Changed 3 months ago by sjamaan

  • Owner set to klutometis
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.