Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When pigs fly I'll accept that "when" implies that something will happen.


Why would you write a when statement for something that can't happen?


If 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: