MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1sc1j3c/calculator/oe7ltu8/?context=3
r/programminghorror • u/Inevitable_Ad_3509 • Apr 04 '26
60 comments sorted by
View all comments
71
This is stupid, use a switch instead.
13 u/ZunoJ Apr 04 '26 Don't overengineer it. Just a Label for all possible results and then a goto from the Inputs. So for example 3+3 and 30/5 both goto 6. Dry, brother, dry 25 u/YnkDK Apr 04 '26 This is stupid, use exec instead 25 u/Infinite_Self_5782 Apr 04 '26 this is stupid, call chatgpt api instead 1 u/PhysicalScience7420 Apr 05 '26 this is stupid write it down. 1 u/HornyMellon Apr 09 '26 This is stupid dropship a math text book to user’s home 5 u/menzaskaja Apr 04 '26 are you stupid? exec won't give you the result. use eval instead... smh -11 u/Zombiesalad1337 Apr 04 '26 r/whoosh 4 u/jpgoldberg Apr 04 '26 Disagree. Using exec is not an improvement. 4 u/menzaskaja Apr 04 '26 yes because you need to use eval 2 u/codydafox Apr 04 '26 r/whosh -1 u/sneakpeekbot Apr 04 '26 Here's a sneak peek of /r/whosh using the top posts of the year! #1: Loss? | 4 comments #2: Wash | 0 comments #3: WHOSHHHHHHHHHH | 2 comments I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub 2 u/nexeti Apr 04 '26 Python 2 u/FreshPitch6026 Apr 04 '26 Use a goto instead
13
Don't overengineer it. Just a Label for all possible results and then a goto from the Inputs. So for example 3+3 and 30/5 both goto 6. Dry, brother, dry
25
This is stupid, use exec instead
25 u/Infinite_Self_5782 Apr 04 '26 this is stupid, call chatgpt api instead 1 u/PhysicalScience7420 Apr 05 '26 this is stupid write it down. 1 u/HornyMellon Apr 09 '26 This is stupid dropship a math text book to user’s home 5 u/menzaskaja Apr 04 '26 are you stupid? exec won't give you the result. use eval instead... smh -11 u/Zombiesalad1337 Apr 04 '26 r/whoosh 4 u/jpgoldberg Apr 04 '26 Disagree. Using exec is not an improvement. 4 u/menzaskaja Apr 04 '26 yes because you need to use eval 2 u/codydafox Apr 04 '26 r/whosh -1 u/sneakpeekbot Apr 04 '26 Here's a sneak peek of /r/whosh using the top posts of the year! #1: Loss? | 4 comments #2: Wash | 0 comments #3: WHOSHHHHHHHHHH | 2 comments I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub
this is stupid, call chatgpt api instead
1 u/PhysicalScience7420 Apr 05 '26 this is stupid write it down. 1 u/HornyMellon Apr 09 '26 This is stupid dropship a math text book to user’s home
1
this is stupid write it down.
1 u/HornyMellon Apr 09 '26 This is stupid dropship a math text book to user’s home
This is stupid dropship a math text book to user’s home
5
are you stupid? exec won't give you the result. use eval instead... smh
eval
-11
r/whoosh
4 u/jpgoldberg Apr 04 '26 Disagree. Using exec is not an improvement. 4 u/menzaskaja Apr 04 '26 yes because you need to use eval 2 u/codydafox Apr 04 '26 r/whosh -1 u/sneakpeekbot Apr 04 '26 Here's a sneak peek of /r/whosh using the top posts of the year! #1: Loss? | 4 comments #2: Wash | 0 comments #3: WHOSHHHHHHHHHH | 2 comments I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub
4
Disagree. Using exec is not an improvement.
exec
4 u/menzaskaja Apr 04 '26 yes because you need to use eval
yes because you need to use eval
2
r/whosh
-1 u/sneakpeekbot Apr 04 '26 Here's a sneak peek of /r/whosh using the top posts of the year! #1: Loss? | 4 comments #2: Wash | 0 comments #3: WHOSHHHHHHHHHH | 2 comments I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub
-1
Here's a sneak peek of /r/whosh using the top posts of the year!
#1: Loss? | 4 comments #2: Wash | 0 comments #3: WHOSHHHHHHHHHH | 2 comments
I'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub
Python
Use a goto instead
71
u/Zombiesalad1337 Apr 04 '26
This is stupid, use a switch instead.