What are your thoughts about using getter properti...
# getting-started
p
What are your thoughts about using getter properties instead of functions? For example
val isPresent: Boolean get() = string.contains("smth")
. I'm starting to wonder, if they should be avoided, since they hide the fact, that they can do some work. I feel like
fun isPresent()
is more descriptive what it does.
s
👍 4
d
One thing is that property access can’t (yet) be suspending, so if you’re working in coroutines, it might force you to use a function