3 ms·
I firmly think that C# has it right - only booleans are true or false, everything else has to be explicitly compared.
by AndrewDucker 13y ago
I firmly think that C# has it right - only booleans are true or false, everything else has to be explicitly compared.
- ToastyMallows 13y agoI agree with this as well. I would rather call a function on an object that returns true/false rather than just use the objects existence as a truth value. In the end I think it makes for more readable code.
- kabdib 13y agoThis has saved me some bugs, quite a few times. And the fix is always obvious, and makes sense. Too many languages try to "help" you with features that, in the longer run, turn out to be painful in subtle ways.