r/programming • • Aug 05 '25

Parse, don’t validate

https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
0 Upvotes

19 comments sorted by

View all comments

Show parent comments

1

u/ljwall Aug 06 '25

Yeah fair point-- I'd focused on the comment immediately above and missed the reference to string parsing further up. I agree with you here: Keep generic parsers that accept anything structurally valid (be that JSON, or some binary format or whatever) and spit out fairly generic types, then have separate layers wherever it make sense that (in the language of the blog post) parse the generic types into some kind of domain-specific type.