Exceptions are a goto, but to make it worse, they're hidden behind several layers of code and happen completely unexpected. Say NO to exceptions.
-
-
exec("/proc/self/exe", ...) is a good one. The hate for goto in C/C++ is totally exaggerated. All the terrible ways to screw yourself with goto have been removed, and moved into exceptions. Unless you write 1kloc long functions, a goto target is always in sight.
-
I personally use gotos relatively often, mostly for stuff like breaking out of multiple loop levels. I almost never feel guilty for using gotos. My rules of thumb: • goto downwards (not skipping constructors) are mostly fine • think twice about goto upwards (it may be a loop)
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.