> "it's all plain text" design that leans extremely heavily upon in-band signalling
Honestly I've been shaking my fist at these since 0 becomes True/Success in Bash and the opposite everywhere else
Honestly I've been shaking my fist at these since 0 becomes True/Success in Bash and the opposite everywhere else
A function is expected to produce a result - so the question is "what was the result?". !0 (something) is the logical expected default return.
I've never found it to be contradictory.
"False pretends to have an error" is where it gets weird. It's not that they got booleans backwards, it's that they're stretching a tenuous analogy a bit too far.
Correct
> so 0 (false) is the logical expected default return.
Nope
We came to expect zero because we got accustomed to it. And it is a "good enough solution" in memory constrained systems.
And note some programs attribute >0 and <0 to different types of errors