--

I get your point, but the EmailAddress object would then be in an invalid state (without an actual email address) and every other developer would have to think about calling `isProvided` before using it (and that's not as obvious as a null check, because I can declare that possibility on the language level (using the question mark on the type)). Have you ever had this case in real life?

--

--

Wolfgang Klinger
Wolfgang Klinger

Written by Wolfgang Klinger

Programmer, Photographer, Gardener

Responses (1)