Changeset 58560d2
- Timestamp:
- Jun 26, 2026, 1:50:40 PM (15 hours ago)
- Branches:
- master
- Parents:
- 63917ab
- File:
-
- 1 edited
-
doc/proposals/exceptions-assert.md (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/proposals/exceptions-assert.md
r63917ab r58560d2 649 649 enough for a user facing error message. 650 650 651 ### THE CHECKED EXCEPTION PROBLEM 652 Yes, this gets an all caps title (it almost got its own section) because the 653 single biggest concern about this system is the additional workload of 654 maintaining checked exception lists on all functions. This is a real concern 655 but I believe this proposal avoids the worst of it. 656 657 One part of "the worst of it" is the annotating of many functions that call 658 some distant helper function that throws an unhandled exception. 659 At this point, it can be impossible to preform any sort of detailed recovery. 660 In these cases the exceptions should be converted to cancellations. 661 662 In my experiance the majority of exception throws (writen, not fired) are 663 effectively assertion failures that are only catchable exceptions out of 664 princible (or are in a long running program were individual operations can 665 just be written off). Cancellation replaces all of these cases instead of 666 the new exception system. 667 668 Another part is the interaction with higher order functions. 669 If a higher order function only works with particular exceptions thrown from 670 the function passed to it, it loses a lot of its flexibility. 671 Both polymorphism and exception tunnelling are ways to address this problem. 672 These stratagies both mean you don't need many different variations of those 673 functions, and hopefully have little (or no) additional code. 674 651 675 ### Default Exception Handlers 652 676 Handling every exception has often proven more work than people want to put
Note:
See TracChangeset
for help on using the changeset viewer.