Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88665 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83591 invoked from network); 4 Oct 2015 15:17:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Oct 2015 15:17:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.160.179 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.160.179 mail-yk0-f179.google.com Received: from [209.85.160.179] ([209.85.160.179:36320] helo=mail-yk0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/E7-31315-02341165 for ; Sun, 04 Oct 2015 11:17:53 -0400 Received: by ykdt18 with SMTP id t18so150471818ykd.3 for ; Sun, 04 Oct 2015 08:17:50 -0700 (PDT) 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:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WXNwgrelVFkSl9Mcgg77DmdjVWmuXFMmt1B+VyoK7dQ=; b=eeNHqkE9kpf9J3pB1sV6B4+o3mkMre/gfGm3kbtOcd3gpNJbtKKqzrk6U1AJf9OQnr aJWUS7JWge34ilcFA9E3rgLo42XSeb5h58hlsffZ5Hx1h2JTkbKWWEsezWxzZplc60AO Ror153d3DU7mOkgY/3UowSqXlqv3Snagwx6HdFiPJDikvss+Qzy6QGh83abj7sSB6z/q rrNpLABH7TvLIkuBZf7XolAYjGhS2CfdQsIEffHhxWOnoROBKk6yCbm0xVSolr7cjj3O B7ObIUosbPcRyxd2DADPAh6g5lrz+HYuIAkbMF+ATTgC/08C0Q+Is06kie3K8gCoY29O QGBg== X-Gm-Message-State: ALoCoQk5S1muBLJFfGn2o+MdYRj7yOC122c+jLCJkHrKANGjSoBMUFAwF8xNkKOXT62Z2unmyMNw MIME-Version: 1.0 X-Received: by 10.13.227.4 with SMTP id m4mr22210881ywe.72.1443971870120; Sun, 04 Oct 2015 08:17:50 -0700 (PDT) Received: by 10.37.76.137 with HTTP; Sun, 4 Oct 2015 08:17:50 -0700 (PDT) X-Originating-IP: [2.96.92.51] In-Reply-To: <8D.64.31315.E67F0165@pb1.pair.com> References: <8D.64.31315.E67F0165@pb1.pair.com> Date: Sun, 4 Oct 2015 15:17:50 +0000 Message-ID: To: Andrea Faulds Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION]: Closure from callable From: danack@basereality.com (Dan Ackroyd) On 4 October 2015 at 09:54, Andrea Faulds wrote: > If we want to make it avoid duplication, > okay, then it could be a static method. Okay, I'll update the RFC to be `Closure::fromCallable()` rather than a function. I was hoping to have something less verbose than that, but you're probably right when you say we ought to do that properly with it's own syntax rather than just a function. Oh using a static method will rule out being able to alias the function with the use function syntax. use function closure as _; //can work use function Closure::fromCallable as _; //doesn't work Which is slightly annoying but =C2=AF\_(=E3=83=84)_/=C2=AF Additionally, I linked to the wrong branch in the RFC. It should be: https://github.com/php/php-src/compare/master...Danack:closureSimpler cheers Dan