Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98151 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 578 invoked from network); 3 Feb 2017 22:47:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2017 22:47:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.221 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.221 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.221] ([81.169.146.221:30009] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/09-38491-38805985 for ; Fri, 03 Feb 2017 17:47:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1486162048; l=2283; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=CU7L6VpMjCVyEpPc2xkOYzH2kQYYQ2AzRC/xJI8Nh6Y=; b=QRWPhSBMU9KTOWY3c5UBrYNf/6wKY5LqX4cR8h/boeh4ONFLm03vIBzCjDZsBOEktB xxK4sZ7MzfX7I4uajkdQSqfOPrBEpF9bEwkDPya7x5pCyBTkqZALwJ3sE7UvXezq1Ki+ oAEO27DnW4qgH2Vemz7W/LkfheME7PgfxxrL0= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoNJBqD/t9k= X-RZG-CLASS-ID: mo00 Received: from mail-qt0-f177.google.com ([209.85.216.177]) by smtp.strato.de (RZmta 39.12 AUTH) with ESMTPSA id z07d5bt13MlRj2C (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Fri, 3 Feb 2017 23:47:27 +0100 (CET) Received: by mail-qt0-f177.google.com with SMTP id x49so58370550qtc.2 for ; Fri, 03 Feb 2017 14:47:27 -0800 (PST) X-Gm-Message-State: AIkVDXI9dDQ6Bu7JAHmAbXDIzbQsQLQmd3ZXWATBViMbuO+zgMKiexIQp1B2rlXsWsV7PuixJq0n820XKIFGQw== X-Received: by 10.200.57.9 with SMTP id s9mr15364749qtb.125.1486162047275; Fri, 03 Feb 2017 14:47:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.144.132 with HTTP; Fri, 3 Feb 2017 14:47:26 -0800 (PST) In-Reply-To: References: <19.45.38491.677D4985@pb1.pair.com> Date: Fri, 3 Feb 2017 23:47:26 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Michael Morris Cc: internals Content-Type: multipart/alternative; boundary=001a11420d5ce81d5e0547a810db Subject: Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions From: me@kelunik.com (Niklas Keller) --001a11420d5ce81d5e0547a810db Content-Type: text/plain; charset=UTF-8 2017-02-03 23:26 GMT+01:00 Michael Morris : > On Fri, Feb 3, 2017 at 3:37 PM, Niklas Keller wrote: > > > > > > There are more drawbacks to that syntax like no parameters looking pretty > > weird: || => > > > > > I can't think of a valid example of an arrow function without any arguments > at all. These functions are very simple iterators to plug into things like > array_map. If you can think of one please post it. > One example might be callbacks operating on `$this`: register_some_callback(|| => $this->someFlag = false); Another example are supplier functions as mentioned by Fleshgrinder. Regards, Niklas --001a11420d5ce81d5e0547a810db--