Comment on if statement == false

<- View Parent
bstix@feddit.dk ⁨2⁩ ⁨weeks⁩ ago

The “only” part implies exclusivity, which may be false, because other things might run the code anyway.

IF “I can see the sun” THEN “It’s day.”

Nothing wrong about that. However if we make it exclusive:

IF AND ONLY IF “I can see the sun” THEN “It’s day.”

That’s obviously wrong. I can actually not keep the day away by sitting with closed eyes in my mothers basement with the curtains shut.

“Only if” might make sense in a legal contract, but there’s no way a piece of code can stop other pieces of code from calling the same functions.

source
Sort:hotnewtop