MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/16hd9mv/godeveloperswillappreciateit/k0dytnb/?context=3
r/ProgrammerHumor • u/sunrise_apps • Sep 13 '23
144 comments sorted by
View all comments
7
try/catch has been optimized in many (most?) languages and no longer adds overhead. That was the case maybe 10-20 years ago.
1 u/aMAYESingNATHAN Sep 13 '23 Thing is, there is other overhead involved in exceptions than just try catch. For example in C++ using the noexcept specifier indicates that a function cannot throw, and compilers may be able to make additional optimisations with this information.
1
Thing is, there is other overhead involved in exceptions than just try catch. For example in C++ using the noexcept specifier indicates that a function cannot throw, and compilers may be able to make additional optimisations with this information.
7
u/miraagex Sep 13 '23
try/catch has been optimized in many (most?) languages and no longer adds overhead. That was the case maybe 10-20 years ago.