News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by Ygg2 on Saturday November 05, 2022 @09:27AM (#33481257)
> 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.

There are no comments on this comment yet.