Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split observableMapOf() into HashMap-based and LinkedHashMap-based #9

Open
yevhenii-nadtochii opened this issue Jun 15, 2020 · 0 comments

Comments

@yevhenii-nadtochii
Copy link

yevhenii-nadtochii commented Jun 15, 2020

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!

@yevhenii-nadtochii yevhenii-nadtochii changed the title Splitting observableMapOf into HashMap-based and LinkedHashMap-based Split observableMapOf() into HashMap-based and LinkedHashMap-based Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant