2 ms·
It would not surprise me any to have a Boolean type and have both true and false as restricted subtypes of that. However, in this case of it being used primaril
by cestith 5y ago
It would not surprise me any to have a Boolean type and have both true and false as restricted subtypes of that. However, in this case of it being used primarily as a return type for failure in a function call, I think they're conflating the tradition from C-style languages of returning a false-ish value in-bound rather than creating a type specific to the error condition.
- masklinn 5y ago> I think they're conflating the tradition from C-style languages of returning a false-ish value in-bound It’s not really conflation when php has been doing that since forever as it originally was little more than a thin shim over C (you can see that in lots of older APIs e.g. the mysql_ stuff is straight transcribed from the C library).