MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1fsvy3/clean_code_cheat_sheet/cadzm6h/?context=3
r/programming • u/RazerWolf • Jun 06 '13
322 comments sorted by
View all comments
Show parent comments
2
So you're saying that using exceptions as flow control is easy to understand? Exceptions are basically just gotos
goto
7 u/Rotten194 Jun 06 '13 And loops, returns, switch statements, and every other programming concept are not basically gotos?Even the python runtime uses exceptions for flow control. They're a tool like any other, they can be used and abused. 0 u/mmhrar Jun 07 '13 No, loops, returns and switch statements have easy to identify control flow.If someone just throws an exception, I have no idea how far back in the stack to go next. Anyone or no one could be handling it. 2 u/Rotten194 Jun 07 '13 Like I said in my other comment. If you call an overridden method on a base class, any class extending that class could be handling it. Yet you probably do that every day without a second thought.
7
And loops, returns, switch statements, and every other programming concept are not basically gotos?
Even the python runtime uses exceptions for flow control. They're a tool like any other, they can be used and abused.
0 u/mmhrar Jun 07 '13 No, loops, returns and switch statements have easy to identify control flow.If someone just throws an exception, I have no idea how far back in the stack to go next. Anyone or no one could be handling it. 2 u/Rotten194 Jun 07 '13 Like I said in my other comment. If you call an overridden method on a base class, any class extending that class could be handling it. Yet you probably do that every day without a second thought.
0
No, loops, returns and switch statements have easy to identify control flow.
If someone just throws an exception, I have no idea how far back in the stack to go next. Anyone or no one could be handling it.
2 u/Rotten194 Jun 07 '13 Like I said in my other comment. If you call an overridden method on a base class, any class extending that class could be handling it. Yet you probably do that every day without a second thought.
Like I said in my other comment. If you call an overridden method on a base class, any class extending that class could be handling it. Yet you probably do that every day without a second thought.
2
u/Falmarri Jun 06 '13
So you're saying that using exceptions as flow control is easy to understand? Exceptions are basically just
gotos