Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92429 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73864 invoked from network); 18 Apr 2016 21:02:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2016 21:02:16 -0000 Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.177 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.214.177 mail-ob0-f177.google.com Received: from [209.85.214.177] ([209.85.214.177:36842] helo=mail-ob0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/BE-11975-75B45175 for ; Mon, 18 Apr 2016 17:02:15 -0400 Received: by mail-ob0-f177.google.com with SMTP id j9so103555164obd.3 for ; Mon, 18 Apr 2016 14:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qDrfCzDnCmhA3FX6aP3C3GOJInUi28cvCYwq9ut8hnY=; b=YXqEWKz1iL+BbQqXJfOBOpL2Z8TJkFRkBVa3cw5FhxVW3r7aa7J8xXzkLZvY+MVrDd gYKlYKyviBoTto1ALMCIKlFcgyETqCs+FRWnCZyeqqYqEhGeSOgBt1nyH7DkYOQ0kuYF E59t8hH2rOxcEhMnIoC6zfQ6WmZQY6TH/c15WyWORQqkH3RvgC1giDngBrqumyCkIug9 H/RSqEsfkvW7q4snDnr42L9cxK14Q2bp42cR7NxGdXe6qoJXuxAdGtS4vJsUX3PnhXUd W/q0OpmvTzHUenGyIF5SEvdQJGcMkrZe3o8yzFtdlc7w6ntDN+TrO8/kFbcP1QppnJ6q /KZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qDrfCzDnCmhA3FX6aP3C3GOJInUi28cvCYwq9ut8hnY=; b=QR7lZRF0jle8exFVDGrtzvf4pfHwGV7riWxnTDuA1OisrzncHjLG/qsPx8Ljpehwyc 3KnYnFLRscsQon7bCU+JdgHMm7mnOGqu91AR51hAaaKFPH8dLdaQJOsT6QVt6Fn224Py iROa/MIxD0wYLi0pdi8Dc9SAaSKIF840OFyj9rUvasu1FC4xS5yMROoS6vnyRoNJUwLq yINIhBxfDg9YlzFF7Prl2wC41BNxoH1iUSAL6ym72CrYtAxVpEp7mBxPkiXTQ9OugqGZ Xqk5QyUhTyLja2N0akH4SEuSHYBGvTOV9naxTlt1oLEEUhvgbsdWYkT3kY0MT6BRdHDG PXwA== X-Gm-Message-State: AOPr4FWSoqoD4mg7wj39p1mgoIU29PTSQlhjF9AbmnRp73ntgNRv90LTbG/GwJ/2C7UiqXg3Y1bJ3gwyYnfnUg== X-Received: by 10.60.0.99 with SMTP id 3mr17427859oed.10.1461013333314; Mon, 18 Apr 2016 14:02:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.192.198 with HTTP; Mon, 18 Apr 2016 14:01:53 -0700 (PDT) In-Reply-To: <571532B2.3050900@gmail.com> References: <571532B2.3050900@gmail.com> Date: Mon, 18 Apr 2016 17:01:53 -0400 Message-ID: To: Stanislav Malyshev Cc: Joe Watkins , PHP internals Content-Type: multipart/alternative; boundary=14dae9c08fc8be95af0530c8accf Subject: Re: [PHP-DEV] RFC: Functional Interfaces From: marcio.web2@gmail.com (Marcio Almada) --14dae9c08fc8be95af0530c8accf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! 2016-04-18 15:17 GMT-04:00 Stanislav Malyshev : > Hi! > > > Please review the following RFC: > > > > https://wiki.php.net/rfc/functional-interfaces > > > > An implementation is provided, and is testable on 3v4l. > > This looks like a rather narrow case already covered by anonymous > classes. Am I missing something? What is the added value of it that > can't be done now? > > -- > Stas Malyshev > smalyshev@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > I haven't decided if I'm in favor of this feature yet but I asked the same questions as you when the pull request landed. This gist served as a good illustration of possible benefits https://gist.github.com/marcioAlmada/12ef23038bcf5acaa2e2f6b808c968d3. Boilerplate measuring apart, it seems logical that a closure should be able to fulfill an interface with a single method. About the applicability, I'm under the same impression as you, the use case is probably narrow, perhaps because anonymous classes is a newly added feature and wasn't explored enough. Cheers. M=C3=A1rcio Almada. --14dae9c08fc8be95af0530c8accf--