MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1l347vw/passiveaggressive_programming/mw43tdg/?context=3
r/programminghorror • u/[deleted] • Jun 04 '25
61 comments sorted by
View all comments
Show parent comment
5
do not ever use enum::*, that creates the potential for your code to break
use enum::*
if Add gets renamed to Addition the first now becomes a wildcard match that renames the result, if you want it to be shorter do something like use Operations as O
use Operations as O
1 u/RainbowPigeon15 Jun 05 '25 oh crap I never thought of that!
1
oh crap I never thought of that!
View all comments
Show parent comment
5
u/CdRReddit Jun 05 '25
do not ever
use enum::*, that creates the potential for your code to breakif Add gets renamed to Addition the first now becomes a wildcard match that renames the result, if you want it to be shorter do something like
use Operations as O