O'Reilly logo
  • MICHAEL MASLENKO thinks this is interesting:

Note that when we say “an instance of Runnable,” what we mean is “an instance of an anonymous class implementing Runnable.” The compiler will create that for you


Cover of Kotlin in Action


7 compilation subtlety new object will be created ONLY if the lambda accesses variables from the function where it's defined. In other words stateless (context independent) lambda instance will be reused!