in reply to Re^2: Mr. Ternary is greater than Mrs. If Else
in thread Mr. Ternary is greater than Mrs. If Else
In contrast, 'if-elsif-else' statements stand out and are thus better readable on larger constructs.
As for \& {}, that's an abuse of the coderef constructor and it will clutter up your symbol table.
|
|
What do you do with your large ?: construct if you have by chance to insert a third condition (a.k.a elsif) statement? Which of both columns is better readable? Can you tell at a glance if there's a semicolon missing (or one that causes a syntax error) on a line in the left column?
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Mr. Ternary is greater than Mrs. If Else
by PerlPhi (Sexton) on May 20, 2007 at 10:53 UTC | |
by blazar (Canon) on May 20, 2007 at 13:31 UTC |