Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65886 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74763 invoked from network); 16 Feb 2013 00:25:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2013 00:25:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=swhitemanlistens-software@cypressintegrated.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=swhitemanlistens-software@cypressintegrated.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cypressintegrated.com designates 173.1.104.101 as permitted sender) X-PHP-List-Original-Sender: swhitemanlistens-software@cypressintegrated.com X-Host-Fingerprint: 173.1.104.101 rproxy2-b-iv.figureone.com Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from [173.1.104.101] ([173.1.104.101:57728] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/10-07348-4F1DE115 for ; Fri, 15 Feb 2013 19:25:25 -0500 Received: from localhost ([216.220.114.66]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id BCP22221 for ; Fri, 15 Feb 2013 16:25:21 -0800 Date: Fri, 15 Feb 2013 19:25:12 -0500 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <1867201214.20130215192512@cypressintegrated.com> To: Nikita Popov In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Questions regarding DateTimeImmutable From: swhitemanlistens-software@cypressintegrated.com (Sanford Whiteman) I think it was done to ease adoption even though it was known to violate LSP. To quote Stas, "As for established practice, everybody expects DateTime, so IMHO we should leave DateTime as base class even though it's not strictly OO-pure." This way does let users sub in DateTimeImmutable more easily and patch over a ton of unintended -- maybe not even fully noted or understood -- defects in their apps? I dunno. I looked at the first discussion from late 2010 after Benjamin E. sketched out the language addition and Larry G. suggested making them siblings as opposed to subclassing, but those discussions seemed to peter out and by the time Derick wrote the patch, the class model was kind of accepted. The discussion from 2012 is rather mild considering some pretty disparate viewpoints are represented, viz. users don't care about mutability vs. users have been coding as if DT were immutable. -- Sandy