Re: Patch: Marking DateTime Instances Immutable
| From: | troels knak-nielsen | Date: | Sun, 05 Dec 2010 18:02:23 +0000 |
| Subject: | Re: Patch: Marking DateTime Instances Immutable | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50857@lists.php.net to get a copy of this message | ||
On Sun, Dec 5, 2010 at 6:44 PM, Benjamin Eberlei <kontakt@beberlei.de> wrote:
> So currently preferred over my patch are two solutions:
>
> 1. Just create a DateTimeValue object that is immutable, not optimizing PHP to handle it with
> efficient garbage collection.
> 2. One step further, add a "static class DateTimeValue" like syntax that creates an
> immutable class.
>
> Any ideas?
I'd prefer BC breakage. DateTimeValue just doesn't have a good ring to
it. Besides, having two both a mutable and an immutable version at the
same time is bound to cause confusion.
--
troels