because now I have to use ``` val x = y if (x != ...
# getting-started
h
because now I have to use
Copy code
val x = y
if (x != null) {}
o
harmony: Couldn't you just check
y
directly?
if (y != null) {}
g
if you're worried about y being maybe reassigned you can do
Copy code
y?.let{
   // anything in here is null safe
   // and will only be excuted if y != null
}
h
y is a function call
t
Remains the same
y()?.let { it.something() }
👍 1