2 ms·
Reminds me of the article "Parse, don't validate", which I found helpful in cleaning up my code and making it more coherent. https://lexi-lambda.github.io/blog/
by Sakos 4y ago
Reminds me of the article "Parse, don't validate", which I found helpful in cleaning up my code and making it more coherent. https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/ https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...
I think there's value in making illegal states impossible to represent with the types you're using, even if you may not be able to completely replace validation. This is one of those cases where "perfect is the enemy of good".