You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Kotlin we have the next map-instantiation functions:
val kotlinMap = mapOf() // LinkedHashMap
val kotlinMutableMap = mutableMapOf() // LinkedHashMap
val kotlinHashMap = hashMapOf() // HashMap
And It would be great to have this in Tornadofx in order to keep coherence with Kotlin standard library:
val fxMap = observableMapOf() // now - HashMap, expected -LinkedHashMap
val fxHashMap = observableHashMapOf() // now - no such a function, expected - HashMap
It's definitely not a problem, but we are now used to it and I was expecting it exactly this way when used observable-instantiation functions first time. Now instantiating observable LinkedHashMap looks a bit boilerplating and doesn't meet neither Kotlin style nor Tornadofx's: LinkedHashMap<String, Int>().asObservable()
May be there are some reasons for that, but I just don't see any.
Thank you!
The text was updated successfully, but these errors were encountered:
yevhenii-nadtochii
changed the title
Splitting observableMapOf into HashMap-based and LinkedHashMap-based
Split observableMapOf() into HashMap-based and LinkedHashMap-based
Jun 15, 2020
In Kotlin we have the next map-instantiation functions:
And It would be great to have this in Tornadofx in order to keep coherence with Kotlin standard library:
It's definitely not a problem, but we are now used to it and I was expecting it exactly this way when used observable-instantiation functions first time. Now instantiating observable LinkedHashMap looks a bit boilerplating and doesn't meet neither Kotlin style nor Tornadofx's:
LinkedHashMap<String, Int>().asObservable()
May be there are some reasons for that, but I just don't see any.
Thank you!
The text was updated successfully, but these errors were encountered: