When I add a factory for new values to a MutableMa...
# announcements
k
When I add a factory for new values to a MutableMap with "withDefault", get() still returns a nullable reference. Is there a way around this?
h
I was confused by this, too, coming from Groovy. Kotlin devs, would you consider deprecating this method name in favour of, say, withDefaultValue for the "helper method for delegating to a map" and withDefaultPut for a new "helper method for treating get as getOrPut(..., makeDefault())"? I'm not arguing strongly for it - it would just be to avoid confusing Groovy developers :-)