Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92407 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8660 invoked from network); 18 Apr 2016 11:37:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2016 11:37:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:35553] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/55-11975-DD6C4175 for ; Mon, 18 Apr 2016 07:37:01 -0400 Received: by mail-wm0-f51.google.com with SMTP id a140so115592560wma.0 for ; Mon, 18 Apr 2016 04:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=zi8o6Jy9AoUeP5+wLoCAsNGF4yRDSJEkUaD0evYuVSs=; b=rb5VkXBMGCYqVOe3N6zYgR9rZfBMUnLx0tH0eFcB7Lxcz35t9hfjCkykC1mT7HSSyD Oy7tA4pakBSoJAJ/qSx6vmVwWANVtDhglFFKKZAQuzzQAMSc96xNKOZoipcU+87HD7dm zxACT+NCjxk9kRT9Ktr4ggi7A/1UWVYqCqpeKwC1Fx/aL32GNqWrRTJk5Tmkq2sngUUq QI3GwsOSmLEi9DZK/RoJNCQe7mYGQ8BckFRZ07CIw5Xv1SJPqx4R4Q8hFD7KL/3pUpVz P2U9Gd+BZWR42Ng1axEpCMkNvilc99R5zm/VvUvVYAgpkjoE+6L9vVKqIL2jRNlwkGne G1yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=zi8o6Jy9AoUeP5+wLoCAsNGF4yRDSJEkUaD0evYuVSs=; b=Igzju3LJUbaznyxjgSe9H0Hm/+Xj1m+fBJzOjC/Dq0m8lAiNpC2gevdkFHSFpvK4By Mm8r2LstY/bgu5AvJAc5zcehg1/vdRaDlRg1IewQ6/bmpdEWWtaURp48iwnCu3B/EayL 3t+x8DoC8EJbpn7HVOsnDXPr4JBkZaON4n1xpI3TyTjBZjkmV65p03q4CQAAdsg/5cEg BMzKOUPkLFKsvZsAS+CYcUhCg5YJW8LiFNbkQebJlFpyBpELaNNoUoHBwoKbLrlwdED1 MFgknW/H/eZdimKDkB8uoXE/ROY/02fJDGyge5S5KgB23kvgagmZUSEqF2LSNQ7xXrU6 iTPg== X-Gm-Message-State: AOPr4FUT80Nr+jdYu70JWDyMDR8W5BKyvQUOoyksyPfoTAEW+anQP34SxQIhbTG+3YNnZw== X-Received: by 10.28.52.212 with SMTP id b203mr17236202wma.11.1460979418302; Mon, 18 Apr 2016 04:36:58 -0700 (PDT) Received: from [192.168.0.77] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id iv1sm7941801wjb.34.2016.04.18.04.36.57 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2016 04:36:57 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <5714C647.7030505@gmail.com> Date: Mon, 18 Apr 2016 12:34:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Functional Interfaces From: rowan.collins@gmail.com (Rowan Collins) Joe Watkins wrote on 18/04/2016 11:22: > Please review the following RFC: > > https://wiki.php.net/rfc/functional-interfaces > > An implementation is provided, and is testable on 3v4l. This sounds like a really nice feature. As well as using functions to implement existing interfaces, it gives a nice way of typehinting the requirements of a callback without forcing users to create an object. I must admit to being a bit confused by the term "functional interface" at first, though, because "functional" has so many different meanings - is this a term used elsewhere, or is it up for debate? In particular, the error message "Fatal error: cannot implement non functional interface IFoo" makes me wonder what's "non-functional" about the interface. It would be clearer to me if it was more specific and avoided the jargon, e.g. "Anonymous function cannot implement interface with more than one method". The error "functional interface cannot implement self" also seems inconsistent with the others - here "functional interface" refers to the *implementation*, not the interface. It might be clearer to just say "cannot implement non interface self" anyway - there's nothing actually special about "self" here, it's just another example of trying to use a class as an interface, which is illegal whatever the implementation. These are of course minor details, and the rest of the feature as described sounds great. :) Regards, -- Rowan Collins [IMSoP]