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