Diego Almeida de Oliveira
1
class Foo { private val logger: Logger by lazy { Logger(getApplicationContext()) } fun aFunctionCalledMultipleTimes() { logger.doSomething() } }
2
class Foo { fun aFunctionCalledMultipleTimes() { val logger = Logger(getApplicationContext()) logger.doSomething() } }
Shawn
Daniel
by lazy
A modern programming language that makes developers happier.