I would be afraid to do this with C++.
My friend once sent me a snippet, maybe 10 lines of C+++, asking "can you spot the UB?".
So I'm staring at these 10 lines, I KNOW there is an UB. I wasn't able to find it without a hint.
Was it the one with the elided null check?
Was it the one with the elided null check?