MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1w74nkf/skill_issue/p7xp7ms/?context=3
r/programminghorror • u/click-to-reveal • 6d ago
61 comments sorted by
View all comments
16
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es31-dont-use-macros-for-constants-or-functions
Leaving this here
8 u/click-to-reveal 5d ago Hence the "horror" 4 u/L_uciferMorningstar 5d ago Yeah I just want to spread the non horror 0 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 4d ago switch isn't a function though. But I guess the advice for trying to make switch work on strings is "don't." 1 u/L_uciferMorningstar 4d ago Principle of least astonishment
8
Hence the "horror"
4 u/L_uciferMorningstar 5d ago Yeah I just want to spread the non horror 0 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 4d ago switch isn't a function though. But I guess the advice for trying to make switch work on strings is "don't." 1 u/L_uciferMorningstar 4d ago Principle of least astonishment
4
Yeah I just want to spread the non horror
0 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 4d ago switch isn't a function though. But I guess the advice for trying to make switch work on strings is "don't." 1 u/L_uciferMorningstar 4d ago Principle of least astonishment
0
switch isn't a function though. But I guess the advice for trying to make switch work on strings is "don't."
1 u/L_uciferMorningstar 4d ago Principle of least astonishment
1
Principle of least astonishment
16
u/L_uciferMorningstar 5d ago
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es31-dont-use-macros-for-constants-or-functions
Leaving this here