Parse, don't validate (2019)
Note that this basically requires your language to have ergonomic support for sum types, immutable "data classes", pattern matching.The point is to parse the input into a structure which always upholds the predicates you care about so you don't end up continuously defensively programming in ifs and asserts.