r/functionalprogramming • u/cekrem • Apr 07 '26
TypeScript Parse, Don't Validate — In a Language That Doesn't Want You To · cekrem.github.io
https://cekrem.github.io/posts/parse-dont-validate-typescript/
33
Upvotes
View all comments
Show parent comment
2
u/pthierry Apr 08 '26
There's a huge downside if it's a convention. When you parse instead of validating, the unvalidated data and type only exist at the boundary of the system. It's not a convention that some reckless developer might choose not to follow. Inside the boundary, only the result of parsing exists.