2 ms·
Types are a huge help for implementing validation in one place - by having separate types for non-validated and validated versions, you can get the compiler to
by lmm 5y ago
Types are a huge help for implementing validation in one place - by having separate types for non-validated and validated versions, you can get the compiler to ensure that every code path actually goes through validation. Static type checking isn't in opposition to custom validation code, it supports it.