https://kotlinlang.org logo
#announcements
Title
# announcements
k

karelpeeters

08/22/2017, 10:02 PM
I don't know, maybe DI frameworks don't always work on private variables?
a

artem_zin

08/22/2017, 10:05 PM
Annotation Processing based like Dagger 1/2 usually need at least package-private visibility for direct access to a field without reflection
d

diesieben07

08/22/2017, 10:05 PM
But really, with Kotlin one should just use constructor injection anyways 🙂
p

Paul Woitaschek

08/22/2017, 10:06 PM
Kotlin doesn’t change the fact that you don’t always control the object creation
d

diesieben07

08/22/2017, 10:08 PM
Usually it's either you yourself or the DI framework creating the instance, is it not?
p

Paul Woitaschek

08/22/2017, 10:11 PM
On Android you have the concept of activites which the system creates
a

artem_zin

08/22/2017, 10:11 PM
Not always, sometimes you need to work in a Framework environment which controls lifecycle of some components
d

diesieben07

08/22/2017, 10:14 PM
Android is a different story, true 🙂