4 ms·
> In Ruby, only nil and false are false, so you can use || to catch 0s and empty strings. But there's still trouble with things like boolean configuration vari
by vog 15y ago
> In Ruby, only nil and false are false, so you can use || to catch 0s and empty strings.
But there's still trouble with things like boolean configuration variables ...
> In Perl [...] there's the // operator
Thanks for mentioning that! [1] The // operator is indeed a clean operator, almost equivalent to COALESCE.
So we have Perl and SQL. Any other language with such an operator?
[1] http://perldoc.perl.org/perlop.html#C-style-Logical-Defined-Or http://perldoc.perl.org/perlop.html#C-style-Logical-Defined-...