well, overall its all about readability problems with Mr. Ternary...
to easily remember the structure of Mr. Ternary a multi-decision structuring as follows:
<expression> ? eval { <statement>; <statement>; <statement>; <expression> ? eval { <statement>; <statement>; <statement>; } : eval { <statement>; <statement>; <statement>; }; } : eval { <statement>; <statement>; <statement>; <expression> ? eval { <statement>; <statement>; <statement>; } : eval { <statement>; <statement>; <statement>; }; };
NOTE: (eval or \& or do) well also work
literally, Mr. Ternary is more on simple symbols that gives you a more concentration on expressions and statements without being bothered with words like if, elsif, and else.
i don't think so that other languages could make Mr. Ternary more functional (making Mr. Ternary hold multiple-statements) than Perl could do. what do you think?
In reply to Re^2: Mr. Ternary is greater than Mrs. If Else
by PerlPhi
in thread Mr. Ternary is greater than Mrs. If Else
by PerlPhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |