<https://twitter.com/kotlin/status/130661657462378...
# announcements
u
https://twitter.com/kotlin/status/1306616574623789056 Did you know? Not only can you define extension properties in Kotlin – you can also define mutable extension properties! https://t.co/49ks8kPowu Twitter
n
It's a neat thing but very limited because you can't add state.
1
(AFAICS)
b
Well you kinda can, but you need to store it externally
In a map indexed by the receiver
E.g. Map<ReceiverType, StateType>
n
I mean that would need to be a global
and there wouldn't be a way to know when it was appropriate to remove state from there
so it would effectively leak memory
so... yeah, i think safe to say that's not a real option
b
Indeed, or globally accessible at least. Definitely not pretty