4 ms·
> It's a very related problem. It's not. You have the same problem regardless of type you place there. > A string is a wrong model for an email address. But i
by Ygg2 4y ago
> It's a very related problem.
It's not. You have the same problem regardless of type you place there.
> A string is a wrong model for an email address. But it's a pretty useful one.
Depends on use case. Perhaps it's an overkill in this toy example.
I've real life use cases with untrusted user input where having raw string as untrusted and some kind of verified type as trusted would eliminate whole swath of errors.