"Don't Throw Exceptions, Use A Result Pattern" is BAD ADVICE!
Codewrinkles Codewrinkles
27.8K subscribers
1,921 views
107

 Published On Sep 22, 2024

"Don't throw exceptions, use a result pattern instead" is the kind of #programming advice that we see viralizing everywhere. The way I see it, that's actually a very Bad advice. Join me in this video as I'll provide a detailed historical context and evolution to show why exceptions were introduced in programming in the first place. The result pattern basically introduces the problems developers had 60 years ago in modern codebases. That's not inherently bad, as programming languages have evolved and we have far better tooling. So what would be a better advice regarding throwing exceptions or returning results? Watch and you'll find out!

Content:
1. Intro: 00:00
2. Functional Programming vs OOP: 01:49
3. Programming Language Timeline: 03:13
4. What problems did exceptions solve? 05:45
5. LISP code "from the 60s": 06:43
6. The real pain before exceptions: 08:53
7. Result pattern - back to the 50s problems: 11:12
8. What's the Good advice? 13:55
9. A logical fallacy at the end: 17:01

show more

Share/Embed