What do you like to do here? ```private val _mySta...
# codingconventions
c
What do you like to do here?
Copy code
private val _myState = MutableStateFlow()
val myState = _myState.asStateFlow()
I have this pattern in many places (using
_
prefix for the private member). Anybody have anything they like better?
m
That is the recommended way from the Kotlin style guide. https://kotlinlang.org/docs/coding-conventions.html#names-for-backing-properties
c
Ah! Thank you. Perhaps I even read this and forgot about it
a
See also this YouTrack issue, as it may affect this convention in the future
m
@elizarov briefly talked about this one the KotlinConf keynote:

https://youtu.be/c4f4SCEYA5Q?t=1171

c
Thank you all for this info, good to know
t
@Marcin Wisniowski is there any hope this will come to life? It's from 2017 and I'm waiting this for so long lol
m
In the video I linked Roman says it’s basically ready and only waiting for the K2 release first.
❤️ 1
j