3 ms·
In the strongly typed language Scala you get the same benefits as in the duck type languages, and even better :-) You can do: val usersById = HashMap[UserId,
by KajMagnus 12y ago
In the strongly typed language Scala you get the same benefits as in the duck type languages, and even better :-) You can do:
val usersById = HashMap[UserId, User]()
if elsewhere you have defined: `type UserId = String`. This is very readable I think :-) And changing the type of UserId is done in one place only.