Hey all! The previous message is awesome, didn't w...
# feed
y
Hey all! The previous message is awesome, didn't want to interrupt, but anyway. Recently I've searched a library for simple key-value storage built on top of a file to store some preferences, so I decided to do the one. Later I had need such a storage in the browser (since I'm using
kotlin/js
I wanted something typesafe and convenient), so I have added support for different platforms. I was experimenting for a while with API because it was hard to unify files sync/async behavior and
localStorage
, but now it's completely friendly for any customization and soon I plan to implement SharedPreferences, NsUserDefaults, Bundle, and so on support. Also, I have ideas to integrate with frameworks such as kvision, more with the link below: https://github.com/kotlingang/kds
👍 2
I've seen https://github.com/russhwolf/multiplatform-settings, it has the same idea, but realization is a bit different since I force to use type-safe delegates instead of unsafe setters/getters
r
Don't you think choosing
fun
as your root package name is a bit unfortunate? 🙂
3
y
I've made this decision a lot of time ago, when firstly bought kotlingang.fun domain, and now I encounter IDEA autocompletion issues like:
OptIn(fun .kotlingang.kds.annotation.DelicateKDSApi::class
), but for users this won't be problem since imports work nice.
😂 3
K 1
r
FYI Multiplatform Settings has the option of using delegates if you want that type safety. I’m interested to look into your stuff more deeply, though, and understand the API differences better, especially around file stuff which I’ve been thinking would be interesting to add to my library eventually.
y
@russhwolf yup, I saw delegates, but
kds
forces to use it, there is an opt-in required in case you want to set or get data directly. In my opinion, this is kind of a different paradigm when you don't control the map with delegates just as a shortcut, but delegates fully responsible for the map control.