Re: Patch: Marking DateTime Instances Immutable

From: Date: Sun, 05 Dec 2010 19:01:48 +0000
Subject: Re: Patch: Marking DateTime Instances Immutable
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-50859@lists.php.net to get a copy of this message
On Sun, Dec 5, 2010 at 7:02 PM, troels knak-nielsen <troelskn@gmail.com> wrote: > 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. It is not only about date but about create value type. There are plenty of good usages for such thing. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#50859) next »