Hello, everyone! I have a minor aesthetic question...
# announcements
Hello, everyone! I have a minor aesthetic question regarding the style of creating collections in Kotlin: when I want to create a collection of a specific type (e.g., HashMap) due to performance constraints, what is the preferred way of creation,
hashMapOf<K, V>()
HashMap<K, V>()
? Similarly, if I pass a method reference, which is preferred,
? I know the factory methods are just calling the constructors, and they are symmetrical to the factory method
(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.