Checking the guide of architecture in Android, I h...
# android
p
Checking the guide of architecture in Android, I have a question about this sentence: "*Types are responsible for their concurrency policy. If a type is performing long-running blocking work, it should be responsible for moving that computation to the right thread. That particular type knows the type of computation that it is doing and in which thread it should be executed. Types should be main-safe, meaning they're safe to call from the main thread without blocking it.*" Does anyone know what they mean with Types?
not kotlin but kotlin colored 2
c
Image from iOS.jpg
r
In this case (as in many cases) you can substitute "class" for "type" and it'll make more sense
There is a subtle difference in kotlin https://blog.kotlin-academy.com/programmer-dictionary-class-vs-type-vs-object-e6d1f74d1e2e which is occasionally important
But this feels like a rushed find/ replace (maybe someone at Google said they should use "type" to be more kotlin) where they're specifically talking about concrete implementations i.e. classes
With bonus ambiguous nonsense like
type knows the type
1
p
thank you robert