Editing Talk:292: goto
Please sign your posts with ~~~~ |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 6: | Line 6: | ||
::Yeah, in most high-level languages exception handeling is preffered to goto. But some lower-level languages like C don't have that construct. Note that exception handling allows to go straight from inside a function to the error-handling code outside the function, which is an advantage over C-style error handling which usually require you to check the return value of every function in case you got a specialized "error code".[[Special:Contributions/141.101.99.228|141.101.99.228]] 19:46, 19 December 2013 (UTC) | ::Yeah, in most high-level languages exception handeling is preffered to goto. But some lower-level languages like C don't have that construct. Note that exception handling allows to go straight from inside a function to the error-handling code outside the function, which is an advantage over C-style error handling which usually require you to check the return value of every function in case you got a specialized "error code".[[Special:Contributions/141.101.99.228|141.101.99.228]] 19:46, 19 December 2013 (UTC) | ||
:::You actually can throw true exceptions in C, but without the syntactic sugar it's tedious (a lot more code), confusing (what the hell does this do?) and error prone (one could easily just wind up going to the start of the try block again, rather then going to the catch block). Also a throws and catch in the same function/method is generally frowned up for the same reasons as GOTO.--[[Special:Contributions/108.162.238.224|108.162.238.224]] 16:48, 27 March 2014 (UTC) | :::You actually can throw true exceptions in C, but without the syntactic sugar it's tedious (a lot more code), confusing (what the hell does this do?) and error prone (one could easily just wind up going to the start of the try block again, rather then going to the catch block). Also a throws and catch in the same function/method is generally frowned up for the same reasons as GOTO.--[[Special:Contributions/108.162.238.224|108.162.238.224]] 16:48, 27 March 2014 (UTC) | ||
− | |||
"Velociraptors are a running joke..." Ha, I get it [[Special:Contributions/79.169.177.15|79.169.177.15]] 13:06, 9 October 2013 (UTC) | "Velociraptors are a running joke..." Ha, I get it [[Special:Contributions/79.169.177.15|79.169.177.15]] 13:06, 9 October 2013 (UTC) | ||
*Shudder* I can't even imagine just how horrible the spaghetti code produced by goto's could be (or what the optimist would call "a code puzzle"). [[Special:Contributions/108.162.221.221|108.162.221.221]] 02:48, 24 October 2014 (UTC) | *Shudder* I can't even imagine just how horrible the spaghetti code produced by goto's could be (or what the optimist would call "a code puzzle"). [[Special:Contributions/108.162.221.221|108.162.221.221]] 02:48, 24 October 2014 (UTC) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |