Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105949 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84046 invoked from network); 16 Jun 2019 08:33:10 -0000 Received: from unknown (HELO mail-ed1-f47.google.com) (209.85.208.47) by pb1.pair.com with SMTP; 16 Jun 2019 08:33:10 -0000 Received: by mail-ed1-f47.google.com with SMTP id k21so10412149edq.3 for ; Sat, 15 Jun 2019 22:47:00 -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=yST2bpq6/JZ8qHRR683atditCKZn5suX8tInDfkANto=; b=DDcM8GoIrTFXVsQ+ruj8AvLa4h7N1FAymselxkZV+6QdOuJrRRUPMgerAIiYQESa1g C4i1IYHjHa0qu5tKXbqS3DruCOh7r4xFmfAQZRMFgJB4SljuTW8/p6OY/rHPiHWp23+U HNoLdTQCaCNUG71rlb72ApBvxQGBe5Bw0Mt+KAT0ri4APW86YlIBUm7/afARlSkpup6V ZUB/yQmCBBhFHlPdBxBj0lIyZSNLQSkaoWOQ7cdxAs025EDlZkraptxjC6xyNq7VzrhJ FTZ+JQpqwOX+h2j8KMvu93l6ILBB+hqRLHDyGHknNLA1ncWtlCDZNzpoHiI2FZn9R62n awfQ== 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=yST2bpq6/JZ8qHRR683atditCKZn5suX8tInDfkANto=; b=NnKzSqPH6nUQZKL94cSnb6xq0PNu2eq/Q72/7G9jy+AH7LJezH0DcBSm6W7H9IZ+BX mB5Kwj7kjVnVP+fAV84qjx1G4u7Ch4f/3qpqZPxzO5P9NrhesOatwvD2ap4R+yiZokwv 4O147ajpBfkc5zHzz4xf3qr9FQVLDesQFn+Sgbl1hr98GE9GMOgmbD3vosJjPTH5MY2x WSZ3LpTUazGOYyM6Pzl1WbP7EgSDJLHxCM/gBX1jZqpTfhSh1ZIyzZq+oObWqjgUgA9N EroniTHOBWjwxoRSTrPyOrPD00VkReLCWU/dMkMan2Hr4eVPpMxo93waE+TZyC4hYmi1 ZRDw== X-Gm-Message-State: APjAAAU/bYfs+0t/VXOTaL+rPd8yDKc6v8DyrZxrXRjAZmZ+8Ep2p4Zz EbqFaZBM0BCH5AMq/Yi2cCMt/IUNijf9AUSw8/U= X-Google-Smtp-Source: APXvYqwmdQIYD81daTG2Z7NkUmsdrWmZLdE6nvSDO/GjIfNguSWS9R3oPocCSpgBKOTAk+Xvo2x89aDac9JQXNur9Aw= X-Received: by 2002:a17:906:1502:: with SMTP id b2mr87858719ejd.284.1560664019209; Sat, 15 Jun 2019 22:46:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 16 Jun 2019 08:46:47 +0300 Message-ID: To: Wes Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000007a93f8058b6a682d" Subject: Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --0000000000007a93f8058b6a682d Content-Type: text/plain; charset="UTF-8" Hi, If at some point we would have multi-statement body arrow function, I would assume that one option would be to have the closure done automatically, as it is done now on the one-line arrow function. If the values will not be implicitly captured, maybe a new syntax to capture can be designed there, for multi-line arrow functions. A way to scan variables is already implemented for the one-line and, I guess, a way to scan for few lines could also be implemented easier for the new syntax. Alex On Sun, Jun 16, 2019, 00:54 Wes wrote: > Hello PHP, I just published > > https://wiki.php.net/rfc/alternative-closure-use-syntax > > I would love your opinion on this > > I know it seems overkill and wrong to have two different syntaxes for the > same thing, but I really believe that's all we need to fix one of the most > hated PHP syntax bits. > > Thank you. > > Wes > --0000000000007a93f8058b6a682d--