In today's video we'll talk about why exceptions are evil and why you should probably stop throwing exceptions for flow control.
Not throwing exceptions will make your code faster, simpler, faster to debug, and easier to maintain.
We'll also see the alternative flow control approach which is the result pattern. The result pattern will be demonstrated using ErrorOr, and we'll see how the ErrorOr library can be used to elegantly return errors instead of throwing exceptions.
ErrorOr: https://github.com/amantinband/error-or
Connect with me on 'em socials:
Twitter: / amantinband
LinkedIn: / amantinband
GitHub: https://github.com/amantinband
Check out all my courses on DomeTrain: https://dometrain.com/author/amichai-...
Support the channel and get the source code: / amantinband
Thanks for watching, don't forget to like & comment & subscribe! ❤️ 💻
00:00. Intro
01:17. Exceptions suck #1 - Messy
03:45. Exceptions suck #2 - Complex
08:40. Exceptions suck #3 - Heavy
09:46. Exceptions suck #4 - Privacy
14:12. Exceptions suck #5 - Monitoring
17:19. The Result Pattern
17:58. ErrorOr
20:15. Result Pattern ftw #1
21:42. Result Pattern ftw #2
23:39. ErrorOr 2.0
24:17. Outro