Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105967 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96189 invoked from network); 17 Jun 2019 22:21:52 -0000 Received: from unknown (HELO wout5-smtp.messagingengine.com) (64.147.123.21) by pb1.pair.com with SMTP; 17 Jun 2019 22:21:52 -0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 744F76BE; Mon, 17 Jun 2019 15:36:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 17 Jun 2019 15:36:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; h=from:message-id:content-type:mime-version:subject:date :in-reply-to:cc:to:references; s=fm2; bh=8MGi08SvzZHfOcSKMF36Wm5 60VbxykW+2xH0GbCWjjI=; b=cJ5JTyISmx3z18tJ2eel1c+6FM5gj13OQp0SSQg DeXzYBwvFN5Yz3dzeMcgzAnE48syC7yXoUhW/G7zQS/4Y/S/uI5gmlM1Vr/suiv7 Rb0SSkoW9KUL77PTHp5hrxjc12huYpzHkkLhTJ4OKURXwX8BQCACmzxg1I/npXuh Pb3yUB01ftBJWnpM3RVcouKQjo7UWUMefXJY50DLzokdJ0yl8qDKtO9qITZGgqJm Emg8j/R87muCn+jUUEhrQ0xfTHAQ7pEmOCBIkAmEfi/Yu6sGXuD/FHJ23on74p6w EwgT3qib62l36pRWSZ4MQt0vWj2QzCu42cn/sqA9u4kug8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=8MGi08 SvzZHfOcSKMF36Wm560VbxykW+2xH0GbCWjjI=; b=csQdZbWvyshpu3OvwrwD/U aYPuRHxRUsYsUoBJF3vG0bLX04J/RWdUe792wyQdTjJ0SkPZaFmiprcVP6biT6T8 GAiCyGpfTozFlpT4m99sDH7CRWJgaKKrQJ4kJvon+OOVpEYB7aCA5TAmMTNeyPKV BHJm0sKYQ3tdKz6UuXdmj6toR+rY2/ym/MqSiEjh41qI9ES7UA1lSeKUJxUAhlAQ LriT9UrxI2XRUf1ci24Rsy+cx7YmY1KrgYcKySaFz0GZ2kK1Chcbz3dBQOpxQ0ja IOvolTMpf8IC4M4fS6AN+//gk15kIe3eTETuumLBW9tbmM4hN/lfkbSO+VCtAh1Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeijedgudegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhkfgtggfuffgjvfhfofesghdtmherhhdtjeenucfhrhhomhepuegvnhcu tfgrmhhsvgihuceosggvnhessggvnhhrrghmshgvhidrtghomheqnecukfhppeeliedrie durddujedtrdehtdenucfrrghrrghmpehmrghilhhfrhhomhepsggvnhessggvnhhrrghm shgvhidrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [10.10.42.56] (h96-61-170-50.lvrgtn.dsl.dynamic.tds.net [96.61.170.50]) by mail.messagingengine.com (Postfix) with ESMTPA id 79D138005A; Mon, 17 Jun 2019 15:36:04 -0400 (EDT) Message-ID: Content-Type: multipart/signed; boundary="Apple-Mail=_F344948A-48F1-42DF-A99D-003881599B41"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Mon, 17 Jun 2019 14:36:03 -0500 In-Reply-To: Cc: internals@lists.php.net To: Mark Randall References: X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV][RFC] Alternative "use" syntax for Closures From: ben@benramsey.com (Ben Ramsey) --Apple-Mail=_F344948A-48F1-42DF-A99D-003881599B41 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 17, 2019, at 12:50, Mark Randall wrote: >=20 > On 17/06/2019 15:40, Ben Ramsey wrote: >>> Where "use (...)" would auto-capture all of the used variables in a = similar manner to short closures, that would certainly save a bit of = time. >=20 >> Would this mean that all variables in the =E2=80=9Cparent" are now = available in the =E2=80=9Cchild?=E2=80=9D This seems like it could = result in some unexpected surprises as scope =E2=80=9Cleaks=E2=80=9D = across these boundaries. >=20 > Just the ones which are used, like short closures. I see. So it would figure it out based on scope and only use those = variables that are explicitly used. This is somewhat similar to the way = $this works in closures today. I think I would be okay with this = functionality, especially if this is how short closures work. -Ben --Apple-Mail=_F344948A-48F1-42DF-A99D-003881599B41 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQToXQMR3fpbrPOmEOewLZeYnIwHGwUCXQfrowAKCRCwLZeYnIwH G3VoAP4qy8+Z2TtsqXbqMzzhM4YT0S+wlIQMYmaxIq6C/R3y0gD9Fd5j3i9Cy7AS PMY4G7s+ot7bBB6MdlT4eEnYkfDrW3g= =dhA+ -----END PGP SIGNATURE----- --Apple-Mail=_F344948A-48F1-42DF-A99D-003881599B41--