AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Object Validation
Instead of having a vehicle at te type, for example, instead you break out those concepts into their own objects. And so as long as you can successfully create one, you pass it into the constructor for the vehicle up date entity,. You know that they 're correct, because they were already validated before you passed them in. Yes, exactly. One of the benefits of functional programis that when you keep your objects immutable, your value objects immutable, you only need to validate those objects once when you create them. After that you can be sure that those objects remain in the consistent, in the correct state, so you don't need to validate them afterwards.