Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88618 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43120 invoked from network); 1 Oct 2015 18:09:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2015 18:09:11 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.41 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.213.41 mail-vk0-f41.google.com Received: from [209.85.213.41] ([209.85.213.41:36679] helo=mail-vk0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/43-26330-6C67D065 for ; Thu, 01 Oct 2015 14:09:11 -0400 Received: by vkfp126 with SMTP id p126so45543755vkf.3 for ; Thu, 01 Oct 2015 11:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=YJtEDncKThyi2zeCAfy25sS9pGpWlQOG2KzD9NdFHu0=; b=h3M31YheogCjdVc64IuLbApBoyd9R9VwlOEuE/D1JkQCzR13OEpJPB3yZkGiQpCV0Y xwObiR2tNXXb74fc+Qtf/v5SIS4u7iw/tHmxXuiOAQdc3+3bgzKAZ/RqLXhP//Vm+Gc0 Lc2MG1/b0mgLg7NZ4K2D4yxPQvdTsnGD50YJ45vHQfQVcJG3HLaKY7qGCCkfZ4JvrCEh 6ESqDZ9Mnm0i8I7dRojKdhtjQ6kxKz7SmJYqheYTux7DNRbkB87Vov32ihL0kx50rgg4 tdfNpmMld2rbQPSSocaD5nKPD755+GQdPWP8LwBRRiVqWi0G1Y4pY5ISZ7JNezhxvFkC 6IqA== MIME-Version: 1.0 X-Received: by 10.31.174.133 with SMTP id x127mr7217815vke.26.1443722948467; Thu, 01 Oct 2015 11:09:08 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.31.41.205 with HTTP; Thu, 1 Oct 2015 11:09:08 -0700 (PDT) In-Reply-To: <560D73FA.8070802@gmail.com> References: <5606D0EB.3060106@gmail.com> <560D0F94.8060009@gmail.com> <560D282F.6060202@gmail.com> <560D73FA.8070802@gmail.com> Date: Thu, 1 Oct 2015 12:09:08 -0600 X-Google-Sender-Auth: ILStScyTiXAaqL7eTRAx6UDHFTM Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Arrow function expressions in PHP From: levim@php.net (Levi Morrison) On Thu, Oct 1, 2015 at 11:57 AM, Rowan Collins wr= ote: > Levi Morrison wrote on 01/10/2015 18:40: >>> >>> Or we can figure out some other such symbol. Worse casing no white spac= e, >>> brain storming: >> >> Please, I already asked people to stop making suggestions for shorter >> syntax for `use()`. > > > I tried to move the discussion to whether or not auto-capturing variables= is > a good idea, regardless of syntax, but the responses continue to be of th= e > form "but that particular example syntax looks a bit ugly". > > So I agree, let's not discuss the details of ANY syntax, until we've come= to > some conclusion on whether or not auto-capture is a negotiable feature. It's absolutely negotiable. I don't need to defend this anymore =E2=80=93 l= ook at the number of yes votes Bob's proposal garnered despite some very glaring concerns about other aspects of the RFC. > >> Again, if use() is a pain then auto-importing the >> used variables is a good solution. If it's not a pain why are you >> suggesting new syntax? > > > I thought I'd answered this already - because some people dislike the > *verbosity* of "use" (and of the syntax in general) but are happy with th= e > *functionality*. You are assuming that "I think the current syntax is > verbose" is synonymous with "I think having to list captured variables is > annoying", but there are people who do not take that position. You are capped to saving about 5-7 characters no matter what you do with this functionality. This is nothing compared to what is proposed if you save just one single-letter variable import with fairly customary spacing: $versionA =3D function($x) =3D> $x + $y; $versionB =3D function($x) use($y) { return $x + $y; }; That's a 27 character difference (well, 24 if you use tab instead of spaces). Twenty-seven. Please think about that before you respond again.