Hacker News new | ask | show | jobs
by adbachman 901 days ago
> the ?? would help a little bit

that's the only point of the operator.

given: a = 0; b = 42;

then `a or b` and `a ?? b` give two different answers, but take the same number of characters to write.

> just explicitly check for nil

1. I am lazy and 2. I am explicitly checking, that's why I picked `??` not `or`