Summary

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

Metadata

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.

Changes and comments

[2016-04-08 00:08:10 UTC] retroj changed priority from major to minor

[2016-04-08 00:08:10 UTC] retroj set keywords to alist-lib

[2016-04-08 00:08:10 UTC] retroj changed component from unknown to extensions

[2017-08-25 15:20:03 UTC] sjamaan changed status from new to assigned

[2017-08-25 15:20:03 UTC] sjamaan removed difficulty

[2017-08-25 15:20:03 UTC] sjamaan set owner to klutometis