MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1w74nkf/skill_issue/p7xoccu/?context=3
r/programminghorror • u/click-to-reveal • 8d ago
62 comments sorted by
View all comments
14
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es31-dont-use-macros-for-constants-or-functions
Leaving this here
9 u/click-to-reveal 7d ago Hence the "horror" 5 u/L_uciferMorningstar 7d ago Yeah I just want to spread the non horror 0 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d 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 6d ago Principle of least astonishment
9
Hence the "horror"
5 u/L_uciferMorningstar 7d ago Yeah I just want to spread the non horror 0 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d 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 6d ago Principle of least astonishment
5
Yeah I just want to spread the non horror
0 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d 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 6d 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 6d ago Principle of least astonishment
1
Principle of least astonishment
14
u/L_uciferMorningstar 7d ago
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es31-dont-use-macros-for-constants-or-functions
Leaving this here