3 ms·
> Admittedly, this prevents you from accessing name until you provide an address, but I don't think there are many valid use cases where you want to access data
by learc83 6y ago
> Admittedly, this prevents you from accessing name until you provide an address, but I don't think there are many valid use cases where you want to access data before the Customer value is corrrectly initialized. I'd consider this a code smell to be refactored.
If you really needed to do that you could just define a partial customer with no address field and pass are that around.