2 ms·
I think you understood the use, but value the safety less than I do: > maybe only your EmailBlaster cares, where it's like a privilege: some can send to unver
by blandflakes 4y ago
I think you understood the use, but value the safety less than I do:
> maybe only your EmailBlaster cares, where it's like a privilege: some can send to unverified emails and some can't
A boolean flag is strictly inferior, because it is a runtime check. You can only ever be sure that you're processing verified emails at runtime, and there's no way to require that the code guards against that in all places. If they're different types, you can't even pass an unverified email to code that needs verified emails, so you eliminate the entire possibility at compile-time.