|
|
|
|
|
by jmduke
837 days ago
|
|
Agreed with this essay, and I think it rhymes with two others that I've found pretty influential over the past five years: 1. Parse, don't validate (https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...) 2. Pipeline-oriented programming (https://fsharpforfunandprofit.com/pipeline/) In my experience, the "best" code (defining "best" as some abstract melange of "easy to reason about", "easy to modify", "easy to compose", and "easy to test") ends up following the characteristics outlined by the sum of these three essays — strictly and rigorously elevating exceptions/failures/nulls to first-class types and then pushing them as high in the stack as possible so callers _must_ deal with them. |
|