Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50859 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8473 invoked from network); 5 Dec 2010 19:01:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2010 19:01:54 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:40025] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/F0-01246-0A1EBFC4 for ; Sun, 05 Dec 2010 14:01:53 -0500 Received: by bwz13 with SMTP id 13so10275391bwz.29 for ; Sun, 05 Dec 2010 11:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=strB5geoF5Z/TU2YH3yruMSHdYxEna1SZduOLAYI6kE=; b=UkUeQpnvmc89UoV2FkNKLmQhmn5JC0rbjfIHNlaeaNyKxIBsF9w62HS+2eHfYoe1oD gXuppvXK9Vu5E3oZfzFeLC/h6XpRmkxgFGrCBEQCtRAi+hoNp1uKHuk3fbv4vIPxVrlk oY6G+9+2aC5zn65b5qfennFK94EY5kLyUO9cY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QDqLGNbWsnUpySncyXWAWn8ms4bBAWBHm02nnfTl2zwDY5D3XYJfD96iaZmgweTUkA V77gjEQMr/a34Izb9AZy1vJy/jF32dGoCJWFZSpxbdUhkGscJ//LYYPQQtrRcj9cDXIt vEWkD4iXp3QSZknyggclCiR9MTHDqUFD4X2MI= MIME-Version: 1.0 Received: by 10.204.61.74 with SMTP id s10mr4918521bkh.91.1291575708963; Sun, 05 Dec 2010 11:01:48 -0800 (PST) Received: by 10.204.52.129 with HTTP; Sun, 5 Dec 2010 11:01:48 -0800 (PST) In-Reply-To: References: <201012050255.54059.larry@garfieldtech.com> <20101205104251.3e0310d5@benny-pc> <20101205184409.3bcf5433@benny-pc> Date: Sun, 5 Dec 2010 20:01:48 +0100 Message-ID: To: troels knak-nielsen Cc: internals@lists.php.net, Benjamin Eberlei Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Patch: Marking DateTime Instances Immutable From: pierre.php@gmail.com (Pierre Joye) On Sun, Dec 5, 2010 at 7:02 PM, troels knak-nielsen wrote: > On Sun, Dec 5, 2010 at 6:44 PM, Benjamin Eberlei 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