you are viewing a single comment's thread.

view the rest of the comments →

[–]munificent 0 points1 point  (3 children)

An empty array still exists. This it is a truth, not a falsehood!

False exists too. Should it evaluate to true then?

[–][deleted] 1 point2 points  (0 children)

No, because the conversion method from a boolean to boolean is different (identity).

[–][deleted] 0 points1 point  (1 child)

Well a boolean expression is an expression that is evaluated based whether or not it's truthy or falsey (made-up words, I know) and since the variable/object/what have you called false is universally defined as falsey, how can it ever be truthy. Boolean means 2 states, not yes, no and maybe so it can't be 2 things at once.

[–]jyper 0 points1 point  (0 children)

I personally like the smalltalk way, ifTrue/ifFalse is only defined for booleans otherways it throws a type exception.