Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92615 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25104 invoked from network); 21 Apr 2016 22:31:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2016 22:31:04 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.26 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.26 out2-smtp.messagingengine.com Received: from [66.111.4.26] ([66.111.4.26:52903] helo=out2-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/E8-14036-7A459175 for ; Thu, 21 Apr 2016 18:31:03 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 3C65F21A30 for ; Thu, 21 Apr 2016 18:31:01 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 21 Apr 2016 18:31:01 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=5DO3vrHhpE98QKW Fh7Cv4AUCK/4=; b=ET3Y2YKae0595iswDyF3vgiVMpdDnjTlGjd+CUGIybMa8Xa sDWx9iFWKhz3zVoDEUYnYhx5IZ5HNx/9wvrxzUz3PJH73nJMIF0uuiHRyCfyFLK0 GAIzTtkqRLmD3g8LXSbkR08MfLkjOdM+CrqcHj2x1ZRMWMHTlnxifcRjE/LI= X-Sasl-enc: 7/Xe3DP8oxPDYNeDBNkH0OW2WKhLVK/EdDjt8f1ftaHP 1461277861 Received: from Crells-MacBook-Pro.local (unknown [63.250.249.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 0080F680201 for ; Thu, 21 Apr 2016 18:31:00 -0400 (EDT) To: internals@lists.php.net References: <3cc8a4c7-2640-11ae-a67b-06f909ac1e27@texthtml.net> <57173859.4080501@rochette.cc> <57180921.8020000@gmail.com> <5718F530.1070503@gmail.com> Message-ID: <571954A4.30403@garfieldtech.com> Date: Thu, 21 Apr 2016 17:31:00 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <5718F530.1070503@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC:generics] From: larry@garfieldtech.com (Larry Garfield) On 4/21/16 10:43 AM, Rowan Collins wrote: > guilhermeblanco@gmail.com wrote on 21/04/2016 16:25: >> I understand others mentioned we could create a new interface that >> wraps the other two interfaces, but that still doesn't solve the >> problem where I want to extend a class AND also implement a specific >> interface. > > I covered this case in my previous mail: you can create an abstract > class that extends a concrete class and adds an interface to it, and > the extra methods are implicitly added as abstract for descendants to > implement: Creating a one off class or interface to handle intersection cases works iff you control all creation points for all objects that you may encounter. That is rarely the case when dealing with 3rd party libraries, as is now typical. -- --Larry Garfield