Hi!

I propose to allow to work with DateTime objects that are marked as
immutable optionally. This means that all methods add, sub, modify,

I think it's a bad idea, which would instantly break all the code that assumes different semantics. Yes, I noticed the word optional, however, the code accepting DateTime assumes some semantics, and had no means to reject object with different semantics, and combining two semantics in one class is a bad idea.

On the other hand, you can create DateTimeValue object, which can do what you want. I'd imagine it'd be quite easy to do in user space too. If enough people feel they need it then it can be brought into the extension too.

I also talked to Derick about this and he agrees that immutable DateTime
objects would be desirable. I have talked to many other people who agreed
that the current behavior is weird.

I've talked to many people who agree it isn't ;)
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to