``` val x = someObject?.someMethod() ?: return ```...
# language-proposals
g
Copy code
val x = someObject?.someMethod() ?: return
is elegant and all, but it doesnt really allow me to handle the missing value flow as much as I would like, I can of course add an extra explicit check:
Copy code
val x = someObject?.someMethod()

if(x == null){
  log.warning("missing things!")
  return;
}
and a smart-casts will even let me treat
x
as a non-null type here, but its not quite as nice as an inline log-and-return or log-and-continue