3 ms·
For those looking for more on "parse don't validate" mentioned in the talk here are links to the original, and two previous discussions. 0. https://lexi-lambda
by tgbugs 5y ago
For those looking for more on "parse don't validate" mentioned in the talk here are links to the original, and two previous discussions.
0. 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...
1. https://news.ycombinator.com/item?id=21476261 https://news.ycombinator.com/item?id=21476261 (original 2019)
2. https://news.ycombinator.com/item?id=27639890 https://news.ycombinator.com/item?id=27639890 (revisited 2021)
- brundolf 5y ago+1, it's become a mantra for me in any code I write that deals with foreign data (which is most of them). Really reshapes your thinking.
- cle 5y agoNo rule of thumb should be a mantra. Parsing when you don’t need to induces unnecessary coupling, which can be quite undesirable in many scenarios. Like any technique, there are times when it’s worth it and times when it’s not.
- bch 5y ago“Parse don’t validate” reminds me of John Ousterhouts “Define errors out of existence.”[0] [0] https://youtu.be/bmSAYlu0NcY?t=1315 https://youtu.be/bmSAYlu0NcY?t=1315
- dannas 5y agoI thought the same thing when I read the blogpost.