Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91245 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53892 invoked from network); 17 Feb 2016 14:25:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2016 14:25:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=kgessner@etsy.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kgessner@etsy.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain etsy.com designates 209.85.192.53 as permitted sender) X-PHP-List-Original-Sender: kgessner@etsy.com X-Host-Fingerprint: 209.85.192.53 mail-qg0-f53.google.com Received: from [209.85.192.53] ([209.85.192.53:33344] helo=mail-qg0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/A8-17120-1F284C65 for ; Wed, 17 Feb 2016 09:25:53 -0500 Received: by mail-qg0-f53.google.com with SMTP id b35so12588731qge.0 for ; Wed, 17 Feb 2016 06:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsy.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=5Boe43OkrefvmWSdFFAjmbnGYlyuQrvwUc6yZYLe7r0=; b=E/v3vGwcpF44PK9qAl53iOlz1kTmwQva6oVgp3/8HcNtZSXqUeexQ3bHfRWR2X0594 COzUoB/WCpavJr7qwnCTaMbwIIV9J02DItHWWhI1G2Je48cE5sBsoyzrsoQvFqzWwR+H mGIEWGYG2R0w6+WG40in0jx2s5b3OzYy8ZlbU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=5Boe43OkrefvmWSdFFAjmbnGYlyuQrvwUc6yZYLe7r0=; b=T4DcALKaETOlCt7Zs6v2nCkhjb/zqK1za+8o1zZzYbY/fhW1SVzoss2SSYmcbp/icu lc/BCV4Vgqt1wU5BlE/QVtRzOklQWULUli8wuvvA7VPYv5Kd1V+SdS9IWeYf/0RFIL6b 1G5N/q+1ANGJwD/y4Yl2CLTl49RXqxH256UwS3A2orD0FszKxwr8ctP68hNdGW9ql2uY X9uIXqhKDOU4grexwYIoTTufRb3Auyvf3hbyd6bvt3AP8N5MzfF6hc/vdPVYy9ZUhVXf gOtlu7Qhnn0tuyDL4GrXISsxAFF5LnLnuRlP9XolWB/OqAuMSQ1sRj1ebsGv0emK57zl o+JA== X-Gm-Message-State: AG10YOQ5KQtmZQkAdoMQI+dWD/4N5E+iM0UNTT/0wes/JX7MR1zwnxfAp4cnlTtBS7L6i9GrcyzVab6bdpqLWy6U MIME-Version: 1.0 X-Received: by 10.140.175.134 with SMTP id v128mr2299293qhv.61.1455719150843; Wed, 17 Feb 2016 06:25:50 -0800 (PST) Received: by 10.55.165.198 with HTTP; Wed, 17 Feb 2016 06:25:50 -0800 (PST) Date: Wed, 17 Feb 2016 09:25:50 -0500 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a113a5c1ee1142b052bf806f7 Subject: [RFC] Traits with interfaces From: kgessner@etsy.com (Kevin Gessner) --001a113a5c1ee1142b052bf806f7 Content-Type: text/plain; charset=UTF-8 Hello internals team! I'd like to propose an RFC to allow traits to implement interfaces. I've noticed s pattern in Etsy's code and elsewhere, where a trait provides a common implementation of an interface. Classes that use the trait are required to also explicitly declare the interface to benefit. I propose that traits be permitted to declare and implement interfaces. Classes that use such a trait would then implement the interface, as though it were declared on the class, without declaring the interface explicitly. I believe this small change would be a useful improvement to the OO system. I've written a draft RFC, but I don't have karma to create the wiki page for it. Could someone please grant wiki karma to my account, kevingessner? I don't yet have an implementation, but I'll be starting on one once I've posted the RFC. I look forward to your thoughts and feedback. Thanks in advance -- Kevin Kevin Gessner Staff Software Engineer etsy.com --001a113a5c1ee1142b052bf806f7--