The language construct is exactly that if-then-else, you’re just making the intended inference.
A ? B : C => !B -> C
I think it’s a different construction.
The programmer’s if-else goes like “If the window is open, close it. Else, leave it closed.” This is not a natural construction outside of programming, people would use “otherwise” or “if not” instead.
(“Else” stands for “if the window is not open” in the above.)
The Crime and Punishment if-else is more like “If the window is open, close it. Else, cold air will enter.” This is normal English.
(“Else” stands for “if you don’t close it” here. It can’t stand for “if the window is not open”.)