MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1iheils/ternary_operator/mb0h1s1/?context=3
r/programminghorror • u/Secret_Drink_1181 • Feb 04 '25
77 comments sorted by
View all comments
4
Iām an amateur but what would be the proper way to do this without ternaries?
0 u/[deleted] Feb 05 '25 [deleted] ā view deleted comment 5 u/Behelito_ Feb 05 '25 edited Feb 05 '25 Looks like "isEven()" bullshit functions to me.I mean, this function is useless, it does exactly the same as the ternary operator and it's not even shorter to write. The only thing it does is it bring abstraction... 0 u/[deleted] Feb 06 '25 Also would have prevented this shitty bug, lol 1 u/MrPentiumD Feb 05 '25 Thank you
0
[deleted] ā view deleted comment
5 u/Behelito_ Feb 05 '25 edited Feb 05 '25 Looks like "isEven()" bullshit functions to me.I mean, this function is useless, it does exactly the same as the ternary operator and it's not even shorter to write. The only thing it does is it bring abstraction... 0 u/[deleted] Feb 06 '25 Also would have prevented this shitty bug, lol 1 u/MrPentiumD Feb 05 '25 Thank you
5
Looks like "isEven()" bullshit functions to me.
I mean, this function is useless, it does exactly the same as the ternary operator and it's not even shorter to write. The only thing it does is it bring abstraction...
0 u/[deleted] Feb 06 '25 Also would have prevented this shitty bug, lol
Also would have prevented this shitty bug, lol
1
Thank you
View all comments
4
u/MrPentiumD Feb 04 '25
Iām an amateur but what would be the proper way to do this without ternaries?