3 ms·
Semantically, "when" implies that something will happen, whereas "if" implies that it could happen.
by tediousdemise 5y ago
Semantically, "when" implies that something will happen, whereas "if" implies that it could happen.
- munk-a 5y agoWhen pigs fly I'll accept that "when" implies that something will happen.
- deleted 5y ago[deleted]
- goatlover 5y agoWhy would you write a when statement for something that can't happen?
- munk-a 5y agoIf you're talking about in english "when pigs fly is" a common idiom. If you're talking about code - sometimes it's nice to have extra-defensive code even if it's mostly inconceivable it will ever be triggered (especially if this will be used as a library for a lot of folks) but mostly you wouldn't.
- aidenn0 5y agoWhen you write conditionals for events that will never happen in your CSS you are doing it wrong.