2017-03-12 14:58 GMT+05:00 Fleshgrinder <p...@fleshgrinder.com>:

> The problem you are facing is that you are dealing with an anemic domain
> object that does not enforce its own invariants.
>

Incomlplete order with date and address not set yet is a valid state of
order.
Also, there are many cases when logic which includes many objects is placed
in a service and not in any of that objects.

> However, you do not require new features to do that.

I don't tell that we cannot make that with current features. I suggest a
way to do that more easy. This is like type hinting. We can check types
manually by calling functions like is_integer() or get_class(), but we
don't have a question why we need to have type hinting in language.

Reply via email to