Hacker News new | past | comments | ask | show | jobs | submit login

[deleted]



> In most programming languages, AND will short circuit. OR requires both operands to be evaluated.

Can you name any widely-used programming language(s) that has a short-circuit AND that returns on the first non-true result but not a short-circuit OR that returns on the first non-false result?


Huh? OR will short-circuit if the first element is true in every language I have ever seen (barring ones that don't short circuit at all).


Why OR doesn't short circuit?




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

Search: