r/programminghorror • u/vadnyclovek [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Apr 28 '26
c++ Competitive programming is no joke
especially for easy problems
149
Upvotes
r/programminghorror • u/vadnyclovek [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Apr 28 '26
especially for easy problems
View all comments
Show parent comment
1
u/LivingVeterinarian47 May 01 '26
exceptions being caught in a closed loop is extremely costly speed wise, it can bring GUI to a stutter. In .NET a lot of the OS level stuff they handle with Exceptions. I think IO.File.Open() will throw 9 different exceptions. Exceptions are great for building tools for others to use, such as a framework or library, but we should really be abstracting them away when at all possible with real production code.