Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85776 invoked from network); 16 Feb 2013 03:04:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2013 03:04:28 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.172 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.172 mail-ob0-f172.google.com Received: from [209.85.214.172] ([209.85.214.172:41526] helo=mail-ob0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/A0-15546-B37FE115 for ; Fri, 15 Feb 2013 22:04:28 -0500 Received: by mail-ob0-f172.google.com with SMTP id tb18so4259655obb.31 for ; Fri, 15 Feb 2013 19:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=ry3kOPgY2efxtKEurMgNTCINO7D6ABpNmPHKARZiDKc=; b=C8uWFzF+T+nNIC7E/lrhG+ikR4cMZWSVswQ9b9VJjrQJIuEm+nw06oqs92pxpSfzR6 yqoxuz6toFNLyK9/dQqXw1PesIfqEE/4h0smse8LCLHeGbRtr+3L3pXceAZry7bScOMO IWb4fx5rEvyfQ+1I9KKEhc2+tqjPuf0fZT7QWd3cKMNg9FvEf5aL6R+WgHp/W+xfD89D nNKFFbJXcyivP3ZKBzz266PlJoCIPR7cEYCxsdTGDePDYizJRy7XQ1wE7Dx3veW5coll pINjGwFjb7Kv0Cj8R6cUX5GbFhUiZNR2IA5tTIbLCk6qUUlVclFo6aJ/EtiPnz3/W46y UMPQ== MIME-Version: 1.0 X-Received: by 10.182.161.39 with SMTP id xp7mr3182334obb.71.1360983864720; Fri, 15 Feb 2013 19:04:24 -0800 (PST) Received: by 10.76.131.77 with HTTP; Fri, 15 Feb 2013 19:04:24 -0800 (PST) In-Reply-To: <1867201214.20130215192512@cypressintegrated.com> References: <1867201214.20130215192512@cypressintegrated.com> Date: Fri, 15 Feb 2013 20:04:24 -0700 Message-ID: To: Sanford Whiteman Cc: Nikita Popov Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Questions regarding DateTimeImmutable From: morrison.levi@gmail.com (Levi Morrison) > 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." I can see how easing adoption would be logical, but honestly I don't think this will help. Just because the outward API *looks* the same, a DateTimeImmutable is NOT a drop in replacement for DateTime. I honestly think that having one or the other inheriting from the other isn't *just* an LSP violation: it's a really big one. It's so big I don't think there's much worth of having them inherit; I dare say it would hurt it. > 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. Exactly.