in reply to Re^3: Useless use of string in return statement
in thread Useless use of string in return statement
Not to mention that return $a ? $a : $b; can always* be written as return $a || $b;
Nitpick: $a and $b should not be understood as stand-ins for "anything", since @a || @b is not the same as @a ? @a : @b, since the former imposes scalar context on @a (and not on @b).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Useless use of string in return statement
by Anonymous Monk on Apr 13, 2021 at 16:11 UTC | |
by haukex (Archbishop) on Apr 13, 2021 at 16:19 UTC | |
by Anonymous Monk on Apr 13, 2021 at 16:34 UTC | |
by haukex (Archbishop) on Apr 13, 2021 at 17:24 UTC | |
by Anonymous Monk on Apr 13, 2021 at 17:38 UTC |