Re:LuaJIT 3.0 proposed syntax extensions
by spider-mario on Thursday June 25, 2026 @05:34AM
(#48671101)
Same in Perl, hence the good old pattern:
open my $fh, '<', 'input.txt' or die;yes, ruby inherited this from perl, though 'or' has lower precedence than 'and' in perl, and they're equal in ruby. Which sounds like something going to cause mistakes, but I yet to see 'and' and 'or' together in the same expression in ruby.
I've always found it odd that and/or in Ruby isn't just considered equal to &&/||, and I have never really used the english operators except for the usual modifiers like if and unless.
What is a practical use case where the lower precedence makes sense?
In general, I would expect symbolic operators to be desirable in complex boolean expressions, because "loud punctuation" stands out among English words when reading the code.