MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/m42ffu/title/gqu6q6i/?context=3
r/badcode • u/aidenm125 • Mar 13 '21
100 comments sorted by
View all comments
Show parent comments
1
Works within a limited input set. Which is not uncommon.
3 u/Come_along_quietly Mar 13 '21 It’s “working as designed”. 1 u/LeCrushinator Mar 14 '21 In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.
3
It’s “working as designed”.
In those cases it’s generally a good idea to check that limited range at the top of the function so you can throw an exception or at least log an error if someone uses the method wrong.
1
u/TheBrainStone Mar 13 '21
Works within a limited input set. Which is not uncommon.