4 ms·
This is true to Ruby's Perl heritage. There is more than one way to do everything, even the most basic of operations. Quiz: what does the following Ruby code d
by lacker 6y ago
This is true to Ruby's Perl heritage. There is more than one way to do everything, even the most basic of operations.
Quiz: what does the following Ruby code do?
a = b => c = d
- regularfry 6y agoMakes me reject the PR for lack of clarifying parentheses.
- copperx 6y agoDo you really punish everybody else because you can't remember precedence rules?
- deleted 6y ago[deleted]
- regularfry 6y agoDo you allow code into your codebase that isn't obvious on a first read?
- JadeNB 6y agoI've always liked the good old Perlism [$a => $b]->[$b <= $a] for the minimum. (I think this is from Effective Perl Programming, but I couldn't find it at a glance.)