Comment by azaslavsky
Comment by azaslavsky a day ago
Couldn't you just take the advice in [0] of parsing into types rather than validating? Then you get the best of both worlds: your inputs are necessarily checked every time the function is called (they would have to be to create the type in the first place), but you don't need to validate them at every nested layer. You also get the benefit of more descriptive function signatures to describe your interfaces.
[0] https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...