kweb-core icon indicating copy to clipboard operation
kweb-core copied to clipboard

Consider whether Kotlin's new StateFlow should impact KVars

Open sanity opened this issue 4 years ago • 2 comments

The new StateFlow API seems to have a number of things in common with Kweb's KVar.

sanity avatar May 09 '20 18:05 sanity

Looks like a pretty interesting concept and I definitely like the idea. I would like to see KVars gone, not because I dislike them, but because I feel there are a few implementations of this concept already and we should be sticking with one of them

alkoclick avatar May 10 '20 14:05 alkoclick

Yeah, I always knew I was reinventing the wheel with KVars and KVals, but at the time I couldn't find anything that fit exactly what Kweb needed.

The only cautionary note is that, because KVars and KVals are used all over the place in Kweb I don't want to sacrifice API ergonomics in order to reuse something that exists.

But if this (or something else) can effectively replace KVars and KVals without making compromises elsewhere then it's a nobrainer.

sanity avatar May 10 '20 22:05 sanity

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 11 '22 03:10 github-actions[bot]

Looked into it, StateFlow is quite similar but I don't think it quite fits our use-case, also it's not stable yet.

sanity avatar Oct 16 '22 16:10 sanity