Because || and &&, much like ?, aren't really operators, but rather control structures disguised as operators. It's impossible to uphold the semantics of ||, && and ? if they would require function calls.
Or, well, I suppose it would be possible in theory if the right-side expressions would be passed as implicit lambdas to an operator function, but that would be rather ugly, and not particularly useful except as a way of confusing the user.
/ Leif Stensson, Lysator
Previous text:
2004-09-26 23:16: Subject: is there a `||()
hi,
i am wondering why there seem to be no functions for || or &&. what is the reason for that?
greetings, martin.
/ Brevbäraren