-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
awaiting-responseAwaiting response from creator. Can't fix without it.Awaiting response from creator. Can't fix without it.with-mutations
Description
I just ran down a nasty bug related to this code below:
Line 413 in 493afba
| return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); |
I did not realize that every time I was creating a new list with List(), I was getting the same instance of List. This seems counterintuitive in a library based on the idea of immutability.
Some code in the project was mutating an instance of an empty list which caused all subsequent newly minted lists to be non-empty. Obviously the code in my project was incorrect, but I came here to suggest not using a singleton pattern here regardless.
Metadata
Metadata
Assignees
Labels
awaiting-responseAwaiting response from creator. Can't fix without it.Awaiting response from creator. Can't fix without it.with-mutations