Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92432 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89366 invoked from network); 19 Apr 2016 00:37:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2016 00:37:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.67 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.67 mail-lf0-f67.google.com Received: from [209.85.215.67] ([209.85.215.67:34276] helo=mail-lf0-f67.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/90-11975-ACD75175 for ; Mon, 18 Apr 2016 20:37:31 -0400 Received: by mail-lf0-f67.google.com with SMTP id e190so120668lfe.1 for ; Mon, 18 Apr 2016 17:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=L+oCKZtdYmOQOGLz3lsa8Y03XFa0knJhkB2KySXQPyk=; b=uBzPml6LTcaIKvSOBKCRz3mkNeip+sWRVh8J16udZNsKbngRRTAgVF0bVN+xy1Sjtx 8VcTKE3dGULx+Z4G6Itsy4ATJ/56Ktfllbq83MWU5g+g+2qCO02+2ehjuMyb4FjnVArX cLaRqMHRP4B/c39mNRxth/IHUxGqxHuNtWJjQwt2QK2thNsHqsq823F/YzqOo1x4u+i0 Fc9GN48arMMSWzmdASjshSfKEmMQKPSERXWnMeV5If3DuSncSXDNPiYwfAam6nwWIg1Q XxoADycsTHx1jPwk0EZlvQHriG/n5IdHovDvuWuriPRMaJlRLqMmongMBhAODdUpPJCE pbng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=L+oCKZtdYmOQOGLz3lsa8Y03XFa0knJhkB2KySXQPyk=; b=ZfNWEwyj10B18YWWonjzf8pd0vlzWfU7xA84klwCi6M3qzWLroZ4CMvKWU65ygl+PM 7bbsoJXhASMYLj9CAdrFe8flvOldIwNphrxio8Og/9XGA0xO9aNOH4TOtQKWt07we/Xv 8FUvx7HwaRey9KfPkVAh5hhJUAAIy0PLGsgOiqFnKzhTb5yitUPJOy3JMszplE4pTo2L zBohRm3iNUA9ECs7+z2Oj8PPmjVR4TYwiRxwr3epJo9NJLyEfvoDCvY1cSeU1hmJjjtN lQtbH0cQVOK/eRNPc1c7FfY/Xkxxb+zKFyir9xeFoJxEDz8yI+HtCxrx3LgXcSsdE6jd mfpQ== X-Gm-Message-State: AOPr4FXaK3Y7elP8UC97gT3dm7G7vr5Wly/z3dOY5wUbHIrOYsLu0a0FLvvxkcg9Z2AJe+dNQadZPGz64LmbLQ== MIME-Version: 1.0 X-Received: by 10.25.86.144 with SMTP id k138mr42973lfb.6.1461026247963; Mon, 18 Apr 2016 17:37:27 -0700 (PDT) Sender: php@golemon.com Received: by 10.112.19.74 with HTTP; Mon, 18 Apr 2016 17:37:27 -0700 (PDT) X-Originating-IP: [107.198.91.68] In-Reply-To: <571532B2.3050900@gmail.com> References: <571532B2.3050900@gmail.com> Date: Mon, 18 Apr 2016 17:37:27 -0700 X-Google-Sender-Auth: 81nWw0pPdVInEPwBIXTCNAZu6kk Message-ID: To: Stanislav Malyshev Cc: Joe Watkins , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: Functional Interfaces From: pollita@php.net (Sara Golemon) On Mon, Apr 18, 2016 at 12:17 PM, Stanislav Malyshev wrote: > 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? > I thought Joe covered that question pretty thoroughly by his countable examples. The version using anonymous classes certainly *works*, but it's significantly more boilerplate code and has a higher cognitive overhead compared to the functional interface example which is concise and to the point. That said, I'm not sure what I'd use it for, but as syntactic sugar goes it's quite sleek. -Sara