Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62097 invoked from network); 19 Nov 2012 18:19:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2012 18:19:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@bof.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@bof.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: php@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:35518] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/83-41116-5387AA05 for ; Mon, 19 Nov 2012 13:19:34 -0500 Received: (qmail 31379 invoked by uid 1009); 19 Nov 2012 19:19:31 +0100 Received: from 209.85.210.170 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/15595. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.210.170):. Processed in 0.10162 secs); 19 Nov 2012 18:19:31 -0000 X-Antivirus-MYDOMAIN-Mail-From: php@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.210.170):. Processed in 0.10162 secs Process 31373) Received: from mail-ia0-f170.google.com (gmail@bof.de@209.85.210.170) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 19 Nov 2012 19:19:30 +0100 Received: by mail-ia0-f170.google.com with SMTP id x24so4006697iak.29 for ; Mon, 19 Nov 2012 10:19:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.0.140 with SMTP id 12mr7530753ige.63.1353349169205; Mon, 19 Nov 2012 10:19:29 -0800 (PST) Received: by 10.50.36.4 with HTTP; Mon, 19 Nov 2012 10:19:28 -0800 (PST) Received: by 10.50.36.4 with HTTP; Mon, 19 Nov 2012 10:19:28 -0800 (PST) In-Reply-To: References: <508A67E6.2000405@zerocue.com> <50A39C58.6030501@zerocue.com> <58826104.Pqfe10HgIT@rofl> Date: Mon, 19 Nov 2012 19:19:28 +0100 Message-ID: To: Nikita Popov Cc: Clint Priest , internals Content-Type: multipart/alternative; boundary=e89a8f646e0d7cd10104cedd28b2 Subject: Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability From: php@bof.de (Patrick Schaaf) --e89a8f646e0d7cd10104cedd28b2 Content-Type: text/plain; charset=ISO-8859-1 Am 19.11.2012 16:41 schrieb "Nikita Popov" : > > On Wed, Nov 14, 2012 at 5:24 PM, Patrick Schaaf wrote: > >> class ... { >> no methodname(); >> // or >> no $property; >> } >> > Removing methods from an extending class is an LSP violation. I see LSP as a best practise for class design, not as something a language should enforce. Also, the propsed "autmatic" use of that "no" mechanism to solve the accessor vs. property precendence issue, wouldn't be an LSP violation by itself. Anyway, the use case I sometimes had for that feature wouldn't even violate LSP. I occasionaly have a subclass which likes to use a ___call magic method to pass method calls on to a delegate object, and that does not work for methods declared on the superclass in any way, be it as "throw subclassresponsibility()" methods or some kind of default implementation that other sibling classes would profit from. The only way out now is to leave out such methods in the superclass, put them into a trait, and use that trait in all subclasses that do not want to delegate. best regards Patrick --e89a8f646e0d7cd10104cedd28b2--