If-Else Shark Jumping

You are hiking in a forest. You see a sign that says

is_black_bear_seen ? is_bear_approaching ? act large, make noise : back off slowly : keep walking

Heck, this is so much better and easier to understand than

if you see a black bear, back up slowly if it is not approaching you. Otherwise, act large and make noise.

Right? Right?

--

--

Khun Yee Fung, Ph.D.
Programming is Life

I am a computer programmer. Programming is a hobby and also part of my job as a CTO. I have been doing it for more than 40 years now.