Follow-up Analysis: The Cost of Algebraic Data Types for Error Handling
By
todsacerdoti
Front-window bakery material. Catches the eye, delivers the goods.
Summary
This article is a follow-up to a previous piece on strongly typed error codes, addressing the common argument that using algebraic data types for errors is essentially free because error information is only filled in when errors occur, which happens rarely on the 'cold path.' The article examines this claim about error handling efficiency in programming.
Key quotes
· 3 pulledError information is only filled in when an error occurs
And errors happen rarely, on the cold path
Therefore, filling in the diagnostic information is essentially free, a zero cost abstraction
You might also wanna read
A Framework for Classifying Programming Exceptions: Fatal, Boneheaded, Vexing, and Exogenous
This article presents a framework for classifying exceptions in programming into four categories: fatal exceptions (unpreventable system fai
Kefir C compiler development moves to private mode indefinitely
The developer of the Kefir C compiler announces the cessation of public development, transitioning the project to private mode indefinitely.
Why Average LLM Use Is Likely Destroying Value in Software Development
The author argues that, contrary to prevailing hype, the average use of Large Language Models (LLMs) is likely destroying value rather than
How AI Accelerated Prototyping: From Idea to Tangible in Record Time
The author reflects on how AI has transformed their prototyping workflow. Previously, the biggest bottleneck was the time needed to scaffold
GitLab 19.0 launches with Secrets Manager, agentic workflows, and self-hosted AI models
GitLab 19.0 has been released, positioning itself as an intelligent orchestration platform for DevSecOps. The release includes expanded secr
bit.ly·1d agoCentralizing Error Handling in Rust with Custom AppError Enums
This article discusses the importance of centralizing error handling in Rust applications using a custom AppError enum combined with map_err
