In this video we explore when to use exceptions vs errors as values and how they compare performance wise.
Original blog post with all links and code: https://hamy.xyz/blog/2025-05_typescript-errors-vs-exceptions-benchmarks
Chapters
00:00 - Intro
03:35 - Benchmarking errors as values vs exceptions
05:15 - Errors vs Exceptions results
07:25 - Errors vs Exceptions Benchmark Code
08:15 - When to use Exceptions vs Error Values
Links:
- Types vs No Types - How Types Allow Code to Scale across Developers, Organizations, and Code Size - https://www.youtube.com/watch?v=ntNGPompHsA&ab_channel=HAMYLABS
- My 2025 Programming Language Tier List - https://www.youtube.com/watch?v=yEIvl2Nuneg&ab_channel=HAMYLABS
- Build a Simple Result type in Python - and why you should use them - https://www.youtube.com/watch?v=1P7J2wI46sg&ab_channel=HAMYLABS
About me: I'm Hamilton - a Technomancer building Simple Scalable Systems.
Connect with me:
- Website: https://hamy.xyz
- Email List: https://hamniverse.substack.com/
- Twitter: @SIRHAMY - https://twitter.com/SIRHAMY
- BlueSky: https://bsky.app/profile/sirhamy.bsky.social
- Pod Cast: HAMY LABS POD - https://hamylabspod.buzzsprout.com/
# Support
If you liked this and would like to see more, consider becoming a supporter: https://hamy.xyz/labs/haminions
Supporters get:
* Full source code access from courses / tutorials
* Exclusive discounts on products / courses
Plus you help me to keep experimenting / sharing!
For Sponsorship info: https://hamy.xyz/labs/sponsors
Information
- Show
- FrequencyUpdated Weekly
- PublishedMay 28, 2025 at 4:00 AM UTC
- Length11 min
- RatingClean