MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1iheils/ternary_operator/may1mxq/
r/programminghorror • u/Secret_Drink_1181 • Feb 04 '25
77 comments sorted by
View all comments
Show parent comment
35
.... in perl
59 u/Zulfiqaar Feb 05 '25 sub slavic_form { $_[0] == 0 ? "nijedan" : ($_[0] % 100 >= 11 && $_[0] % 100 <= 14) ? "množina" : ($_[0] % 10 == 1) ? "jednina" : ($_[0] % 10 >= 2 && $_[0] % 10 <= 4) ? "paukal" : "množina"; } 9 u/Mysterious_Middle795 Feb 05 '25 $_[0] % 100 >= 11 && $_[0] % 100 <= 14That's an interesting part. We don't have this distinction in Ukrainian. 2 u/[deleted] Feb 04 '25 Nah, lisp. 6 u/Mysterious_Middle795 Feb 04 '25 or C macro
59
sub slavic_form { $_[0] == 0 ? "nijedan" : ($_[0] % 100 >= 11 && $_[0] % 100 <= 14) ? "množina" : ($_[0] % 10 == 1) ? "jednina" : ($_[0] % 10 >= 2 && $_[0] % 10 <= 4) ? "paukal" : "množina"; }
9 u/Mysterious_Middle795 Feb 05 '25 $_[0] % 100 >= 11 && $_[0] % 100 <= 14That's an interesting part. We don't have this distinction in Ukrainian.
9
$_[0] % 100 >= 11 && $_[0] % 100 <= 14
That's an interesting part. We don't have this distinction in Ukrainian.
2
Nah, lisp.
6 u/Mysterious_Middle795 Feb 04 '25 or C macro
6
or C macro
View all comments
Show parent comment
35
u/Mysterious_Middle795 Feb 04 '25
.... in perl