You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How does this differ from Map's implementation? #9
I was looking for exactly that, but I wish the doc explained why the implementation is more complex than expected and why we shouldn't simply use defdelegate to Map, as in #5?
This is nearly Map.put, but doesn't put a value if it is not declared in the struct. Which makes some sense, because you'd want the struct to keep its structure, and not have additional ad-hoc keys. One can argue whether it should silently discard (as is done here) or throw an exception, and I agree that such a choice should be documented.
Activity
turion commentedon Sep 1, 2023
I can only speculate. Let's have a look at
put:This is nearly
Map.put, but doesn'tputa value if it is not declared in the struct. Which makes some sense, because you'd want the struct to keep its structure, and not have additional ad-hoc keys. One can argue whether it should silently discard (as is done here) or throw an exception, and I agree that such a choice should be documented.