My first multiplatform library open for feedback. ...
# multiplatform
x
My first multiplatform library open for feedback. https://kotlinlang.slack.com/archives/C0BJ0GTE2/p1662937749366859
👍 1
🙌 1
m
Shouldn’t
Copy code
val storeOf: KStore<Pet> = store("path/to/file")
be
Copy code
val store: KStore<Pet> = storeOf("path/to/file")
x
Ah i messed up the docs - nice catch. It should be
Copy code
val store: KStore<Pet> = store("path/to/file")
m
According to https://github.com/xxfast/KStore#configurations it should be
storeOf(…)
, shouldn’t it?
x
it was before, but’ve changed the api to simply be just
store()
i might change my mind before this hits 1.0 😅
wanted to be consistent with collection factory methods like
listOf
setOf
etc. But this doesn’t really read well when it is just a path
Copy code
val store: KStore<Pet> = storeOf(path)
m
I would then change the example to
Copy code
val petStore: KStore<Pet> = store("path/to/file")
in order to avoid any confusion. In practice you will mostly have several different stores anyway. (I still like the storeOf variant though 😉)
x
Done 👍 i’ve changed my mind and went with
storeOf