Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15068 invoked from network); 18 Apr 2016 12:03:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2016 12:03:28 -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:38514] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/86-11975-F0DC4175 for ; Mon, 18 Apr 2016 08:03:28 -0400 Received: by mail-wm0-f51.google.com with SMTP id u206so120494162wme.1 for ; Mon, 18 Apr 2016 05:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=MD3xFH7x/Zfjg1WHkUIlK95cUC7+9MzDmJdrq/gO9Yw=; b=I5wIqCj6aHe9xZgJC74Ue0eODcH6tI+xUyfQre3yd2EL0/sMLGS5MC9Cs4JCxup5my gjqu6TKApPoYkf0bY2lm8VviHUv1GX8hJBEWV7JxB3D77dHoCpN6kpDfDGOGptHGr6gJ kw/zdPe1ZWwrk9coXPNDJ4OGgoNvHwYkwLcD2KXUhhhmOq3cXq+62CMx7Aig5+A9qyKh H42Rq5TVg1VbY1dthEsxD9awWQs9lSlacwrSsD/0gk5mRSx7ShxIrfGZhpq1PyifPyDP 1dbuCnmmDubu1Dji1lH9KeaeMHeHKf5LKwouTL4idL7oF7iEwi/D0SwVwMfzTf3YxCkV 6WCw== 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:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=MD3xFH7x/Zfjg1WHkUIlK95cUC7+9MzDmJdrq/gO9Yw=; b=TkmoGnYjg9QiNCl+26v97brRA4OPr++V5d6hqT5liV9thYKENxxm5kjPzaOqv7zrpC uiqciA5FB/h4/W2ylGHQSKjf64jn/GhI8usMBEWbMvIOlbyKJoj1h+C4DVHoQXGDs4VR HP9kaQC+eUTQP0i5rO23xe3g6J2f4m+CCzsHoy/R4E/NLCMt+RgSFwFK/L//UIDtKIL+ 0SJf/n/UhKmjdHkdL61DGJXHdW8/UezjefWsNs+UCBEJaUcs48f0LQox/5fis53RPKEW rDDERknl1zqDO45U+P6kzUtSQbA1OUFbGDGXBaxKUHr10s6StSIzfFfIupOW9BN0wBAX 3v3w== X-Gm-Message-State: AOPr4FXheagaqPHRKiGge0BnctPT2W9azu3ePEqcZsrM1dt4kQuHlblU7cigkAstitCmOA== X-Received: by 10.28.157.142 with SMTP id g136mr18338859wme.29.1460981004737; Mon, 18 Apr 2016 05:03:24 -0700 (PDT) Received: from [192.168.0.77] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id a202sm13717868wme.1.2016.04.18.05.03.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2016 05:03:23 -0700 (PDT) To: Joe Watkins References: <5714C647.7030505@gmail.com> Cc: PHP internals Message-ID: <5714CC79.6040506@gmail.com> Date: Mon, 18 Apr 2016 13:00:57 +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 12:53: > Morning, > > > 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? > > The terminology is borrowed, Java 8 uses lamdas to implement specially > annotated interfaces, it refers to them as functional interfaces. > Thanks, I figured that was probably the case. > As far as anyone who is not familiar with the workings of PHP is > concerned, what they have is a function that implements an interface, > functional interface is a pretty good description of that. I guess what's confusing is that the new feature happens entirely at the implementation end, but the term describes the interface itself. What we actually have is a functional *implementation* of a normal, non-annotated interface; but the interface is *implicitly* functional because of having only a single method. So when the error says you have a "non functional interface", it's not clear what you need to do about it. I like the implicit definition, though, because it reduces the need for a forwards compatibility break (libraries can support old versions of PHP, but their users still take advantage of the new feature if they want). So I'm not really sure how to make the definition of "functional interface" clearer, other than making sure we write some decent documentation. :) Regards, -- Rowan Collins [IMSoP]