Let me give you another example. Imagine that you have a big library / framework / project. And you are just debugging it. And then your execution flow jumps to some random place in the code with an exception thrown somewhere inside the method you were jumping over. "What the hell happened?" is what I usually have in my mind at this moment.
I know what you're talking about, I've been there but to me is more an issue of abstraction than of exception handling. Some apps have too many deps :D BTW how is that super different from calling a function?
importtemplate_librarydefmethod_to_do_something():a="Hello world"result=template_library.render(a=a)# do something else...
returnresult
in this example I jump from method_to_do_something to template_library.render and back everytime I debug. And then if render calls yet another library the thing goes on. Sometimes you spend minutes stepping in libraries because the dependency tree is long (Ruby with open classes, heavy use of metaprogramming and DSLs sometimes is a nightmare to debug)
If you think about it, in a way, functions are labeled gotos with an address to go back to ;-)
and, yes, my example with Result['UserProfile', Exception] should be rewritten as Result['UserProfile', ExactExceptionType].
ok, that's make a little more sense :D
That's a rule that I have created for myself. Not talking about just python, but also elixir and typescript
Got it. Programmers are strange animals, when they find a tool or an idea they like they want to apply to everything :D.
Thanks for taking a part in my rant, I have really enjoyed reading your response ;)
ahhaha :D
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I know what you're talking about, I've been there but to me is more an issue of abstraction than of exception handling. Some apps have too many deps :D BTW how is that super different from calling a function?
in this example I jump from
method_to_do_something
totemplate_library.render
and back everytime I debug. And then ifrender
calls yet another library the thing goes on. Sometimes you spend minutes stepping in libraries because the dependency tree is long (Ruby with open classes, heavy use of metaprogramming and DSLs sometimes is a nightmare to debug)If you think about it, in a way, functions are labeled gotos with an address to go back to ;-)
ok, that's make a little more sense :D
Got it. Programmers are strange animals, when they find a tool or an idea they like they want to apply to everything :D.
ahhaha :D