Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104721 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92664 invoked from network); 14 Mar 2019 20:34:55 -0000 Received: from unknown (HELO mail-ua1-f45.google.com) (209.85.222.45) by pb1.pair.com with SMTP; 14 Mar 2019 20:34:55 -0000 Received: by mail-ua1-f45.google.com with SMTP id 46so696349uan.8 for ; Thu, 14 Mar 2019 10:25:21 -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=CkCPk74gC4FQNKTLetwzOgfhmuUll8jFYxJYRHMC6UI=; b=pfVIAJn3vupljpk66Q+uBmmq3UvJn04qnj51M19LYQYybhRj4oJskNHjc0ePu7eDe3 mge3AQA0jmgyho74SkDAXPoOgcmwpE8Wt873XUYvB+tELrJn87XqK9//E1UXC6ZYwMGm 5oJOonpf7tBjCh/PRdEaFHp5i1vN3T0W16ta/mIMSs4jvlu4CzuqOk4TKpCLZgc6ZbaY BTJ6bzkX1ocwX2yOXi17Y1GunAhcgpk/oFxPyAElOJ3y2+LvWGhu4G7/+XB1ixrEpCvT +KrqRiMjwOAlxJMi6k9zxJxofDH4ev+S1HeMnVquyMO2dnsTrInz1vq1elFR8Tv6Rpiw 4zKw== 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=CkCPk74gC4FQNKTLetwzOgfhmuUll8jFYxJYRHMC6UI=; b=kzgvIu9s6KpglLDw30GrzZmIemG4veTJ9MzZe2WOgZUdbiePRH0LXLauv5Ll8DPvvA WAcRNlyLyGxAWiiTJ+mw+6nLVAtbV69H1b4QLBGp21UHHh+qgq2AkK6m7YPX6jtCbm3s oYAG2i/VQ/kpJG9s2BpOM24onkkOy1j3uii6gJskLb8GJqyCcn43sJfbldRS9Rf3s4ml m31+sVNIsDrX1CqoEX7RZgQe3DyBGSliyrbGs/LW+fgkFXiw1w1l194CIOqo5E2M95iU wogGn8XCEnRfCH9ykN3zfuoS7Nqx0atQAxBAd4XQihDjmUro1NIr1uSczhDXlZefZDUC Wz/w== X-Gm-Message-State: APjAAAVQqJ5ioRQsTpg8sBp6wD0XeDka7jvQneNvDjJtGrEGECtmN++d YEmtiw537DuiAYbhLoNpNqdqT/c1Z16RAWboIJY= X-Google-Smtp-Source: APXvYqxTI2elAITsblB14WJnJ+LeqNHG5vSUKPDP3Vca66GziuSnzYMfjmYHApo/9VjbMgrCX3FKZnQEpyOdzgqJaI0= X-Received: by 2002:ab0:3451:: with SMTP id a17mr26691709uaq.60.1552584321360; Thu, 14 Mar 2019 10:25:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 14 Mar 2019 18:25:08 +0100 Message-ID: To: Josh Di Fabio Cc: Rowan Collins , PHP internals Content-Type: multipart/alternative; boundary="000000000000f5680d05841134b3" Subject: Re: [PHP-DEV] [RFC] Arrow functions / short closures From: george.banyard@gmail.com ("G. P. B.") --000000000000f5680d05841134b3 Content-Type: text/plain; charset="UTF-8" On Thu, 14 Mar 2019 at 18:20, Josh Di Fabio wrote: > 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. > No offense but at the end of the day having readable code is better than shorter code IMHO, so I don't really see the problem with having a couple of extra character/keystrokes as this is more readable then the massive boilerplate we currently have. However, I can see people beeing fond of the concise syntax of JS Best regards George P. Banyard --000000000000f5680d05841134b3--