> my email is not a string, it's a email, and my longitude/latitude pair are not just ints they have specific ranges, saying that longitude is 500 is as wrong as saying it's "foo"
I fully agree. Those sound like exactly the kind of thing I would enforce using types.
> and this only in the places I need, no need to a schematize or assert every simple function with obvious parameters.
How do you enforce that all code paths go via your schema? Just visual inspection?
What's the distinction you're drawing here?
> my email is not a string, it's a email, and my longitude/latitude pair are not just ints they have specific ranges, saying that longitude is 500 is as wrong as saying it's "foo"
I fully agree. Those sound like exactly the kind of thing I would enforce using types.
> and this only in the places I need, no need to a schematize or assert every simple function with obvious parameters.
How do you enforce that all code paths go via your schema? Just visual inspection?