kotlingang/kds

Custom Implementation of `MutableList` and `MutableMap`

Closed this issue · 1 comments

It will be good if library create custom implementation of MutableList instead of Storage.mutate to improve experience of working with library.

How it may look like:

object Storage : ... {
    var keys by storageMap("0" to "...")
    var users by storageList(0, 1, 2)
}

fun main() = with(Storage) {
    keys["foo"] = "bar"  // save invoked
    users += 10  // save invoked

    keys = mapOf(...)  // save invoked
    users = listOf(...)  // save invoked
}