Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Operation result class
#7
(Feb-25-2024, 10:12 AM)SirDonkey Wrote: what i do not like that much is the introduction of some kind of a second hidden control flow.
It is a "vertical" control flow, while the normal control flow is "horizontal". It allows you to program by assuming that things work. For example if you want to get a pack of beers, you need to put your shoes on, take your car, go to the store, find the aisle containing the beers, take a pack of beers, pay, take your car again, go back home. etc. All of these actions may fail individually but you don't want to write code to handle the innumerable failures that may happen. If anything fails, the relevant information is that you can't get the pack of beers and that's enough in many (if not most) cases. That's where exceptions come handy. If anything fails, an exception is thrown and that's what you get, but you can still write the code as if every operation was successful.
SirDonkey likes this post
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
Operation result class - by SirDonkey - Feb-24-2024, 04:23 PM
RE: Operation result class - by Gribouillis - Feb-24-2024, 05:16 PM
RE: Operation result class - by deanhystad - Feb-24-2024, 05:27 PM
RE: Operation result class - by buran - Feb-24-2024, 07:52 PM
RE: Operation result class - by SirDonkey - Feb-25-2024, 10:12 AM
RE: Operation result class - by buran - Feb-25-2024, 10:40 AM
RE: Operation result class - by Gribouillis - Feb-25-2024, 10:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using one method's result for another method in the same Class? btownboy 3 2,400 Sep-13-2020, 06:37 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020