As Nikita says, from an ORM perspective, an object is always immutable (at
least with current implementations I know of), and that's because they can
simply use the object hashes to identify two different objects.

While this may be a niche to many of you, I've encountered a quite big
amount of people just modifying their DateTime objects with the existing
API and then complaining about their date not being saved to DB.

I don't believe (at all) in "if you don't need it mutable, don't use
modify() oroverride modify()". If the API is there, people will use it. We
tried to implement an immutable DateTime in userland, but it doesn't work
out well...

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

Reply via email to