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

But there are situations when not-null assertions are the appropriate solution for a problem. When you check for null in one function and use the value in another function, the compiler can’t recognize that the use is safe. If you’re certain the check is always performed in another function, you may not want to duplicate it before using the value; then you can use a not-null assertion instead


Cover of Kotlin in Action


7 !! possible good case for non-null assertion