I think the confusion comes from how errors occur - errors do not simply happen randomly, they happen for reasons. A map update should never result in an error occurring, maybe except some kind of fatal error like an out-of-memory error, in which case the program will not be able to work properly anyway.
Updating a map is (pretty much) as safe as creating an array - we don’t need, or want, to error check it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you go over implementation, you will see that it is not possible that updation of one map can fail.
Should not be any issue with using non primitive values.
Complexity of searching key or value will be constant O(1);
I think the confusion comes from how errors occur - errors do not simply happen randomly, they happen for reasons. A map update should never result in an error occurring, maybe except some kind of fatal error like an out-of-memory error, in which case the program will not be able to work properly anyway.
Updating a map is (pretty much) as safe as creating an array - we don’t need, or want, to error check it.