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

When you declare an extension function for a nullable type (ending with ?), that means you can call this function on nullable values; and this in a function body can be null, so you have to check for that explicitly. In Java, this is always not-null, because it references the instance of a class you’re in. In Kotlin, that’s no longer the case: in an extension function for a nullable type, this can be null

From

Cover of Kotlin in Action

Note

7