Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104720 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90317 invoked from network); 14 Mar 2019 20:29:41 -0000 Received: from unknown (HELO mail-io1-f47.google.com) (209.85.166.47) by pb1.pair.com with SMTP; 14 Mar 2019 20:29:41 -0000 Received: by mail-io1-f47.google.com with SMTP id u12so5794122iop.11 for ; Thu, 14 Mar 2019 10:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h8TEz5ZxBGazqaVmwNxFJxGP4CRFMejK2VSVJwhLeS4=; b=kyrurCoiH23DVa8b0U4uOnoSDsAqQjzpyQIVNLPEozlRG3Orl/FVJBaOIARBikFd/u iTrTSm2c/3XnIZN9K1YgW4w179NSF2bKN1kDGqReNAo6Pt/EeO5jwwxH06T9OpaOz4Jf ojA2Ua6RJ1XAlMc/wYkW3RU+baXLyI48tLjff4cc7rKTd6TsQMXJTTQB37YC1kW8mnMJ VXwlujorzvDGKewdR4BSZBz4zgptXpO032oQEf42xncPq9lPbLQfaxFh4qu0Hfe+zRmg dg0uGvXa264DQj7/2HMucIeT54jTLgOEd4c9+n1IF0VlDS1ENO2flFQzHONQePEniXBY VH9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h8TEz5ZxBGazqaVmwNxFJxGP4CRFMejK2VSVJwhLeS4=; b=e1Xd1F6gSSPQ6HKAR6SG8vhgUlj0VNRR5aGxGzLJIbrqLz5xjQwlZhTlu+03aRV6yG rf59w8o6g9hA/HMpUJx0r0kPX4d/Yl37aLA6Z6nWAujrMv1MhwEi3ibW3/PYzOaCWVOR WxUnLtPyDSUb7cy7KnZv9cl/bMr3rXPJLUc972fa1gmgRNT64dBwqYd68MDMx0TF1xy3 I5Yf8U5+BdiFPxPh69CZRPfSm1WZYrMT2A6QVYtfAZGybCexo6YK+sbm1kwGU8Ta6IuD f2KhQkwesBoC93pGMsDacbkieYr4S2rxKjfOdFKKiRUgCSx0MTxkdagohMZpUAS5upYg MZzw== X-Gm-Message-State: APjAAAVxawY+1jy2ZV++y122S6JkW5iCLOZ0UJZYhZSQ3CeNsJ978LDp Ht4DVZKkKBNNde+CJOVZFSUDIN2Ld76xOLFcduU= X-Google-Smtp-Source: APXvYqztTdgIEO/jMj1CB2LGY1LTdn2FSnBnl4WLbUGb9TEDZkB7Ia8gtacuOOVVaoh2rxwxKvGv0re7OkKpAucngK8= X-Received: by 2002:a5e:8c07:: with SMTP id n7mr20013440ioj.301.1552584007233; Thu, 14 Mar 2019 10:20:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 14 Mar 2019 17:19:56 +0000 Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Arrow functions / short closures From: joshdifabio@gmail.com (Josh Di Fabio) On Thu, Mar 14, 2019 at 3:49 PM Rowan Collins wrote: > > Is it really that important to save two key strokes per closure? > I'd say that the (probably overwhelming) majority of arrow functions have a single parameter and, in those cases, the JS syntax saves four characters, ignoring whitespace. Another way of looking at it is that you have six characters of boilerplate with the fn() syntax versus two in JS (ignoring whitespace) for single param arrow functions.