andrei.heidelbacher
03/06/2018, 12:42 PMhashMapOf<K, V>()
or HashMap<K, V>()
? Similarly, if I pass a method reference, which is preferred, ::hashMapOf
or ::HashMap
? I know the factory methods are just calling the constructors, and they are symmetrical to the factory method mutableMapOf
(same for sets and lists), but I know the concrete type I want and I'm not sure if there are any guidelines regarding this.
What I actually want is to pick one of these two methods of creating collections and stick with it across the whole code-base for consistency, I'm just wondering what others do regarding this and if there actually is a guideline.