During a workshop we were discussing the concept of a https://matthiasnoback.nl/2022/09/is-it-a-dto-or-a-value-object/. The main characteristic of a DTO is that it holds only primitive-type values (strings, integers, booleans), lists or maps of these values including "nested" DTOs.
A question that popped up during the workshop: can we consider DateTimeImmutable a primitive-type value too?
Fourth, we could consider "primitive" to mean - regardless of the language - "what types do we need to describe data?"
For me, this final point is the most important attribute of primitive-ness, which disqualifies DateTimeImmutable as a primitive-type value.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.