Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122134 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97226 invoked from network); 6 Jan 2024 16:38:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jan 2024 16:38:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1704559118; bh=7hpDaxSJVOOjw32yyLtZQwjMZPq1gpMf+ywsVxYVPUs=; h=In-Reply-To:References:Date:From:To:Subject:From; b=mlDFcc0jdN1QzfA6mTjdnv5VAXWgJA5utZbO4fIgKMEU2sC4Id2+zvw5oH53atYSJ 8JATmR9s/e+xU+fHwJGU6jpVHAg5lkhygUS4VHzirfPXpbFGPD/jrBmCrbITkPpN1x JPM8EI2iUzn/xDLQkP+VRsQGIISLKSLPizJUUFDWfcwu3DUObDZ0o4K2nn7WaVad6R FIHX8u0hdwBQvAylLjCMYYmyPtZMDKdu69XoY++nOVXMpxIv6eOqPC3QwP3IN9Ed/A OyoRcRH5RDu4/1d6trmrg7L+nwCUa31IgEbKyhgh2WAvKc7m6IGnhfsg1eVcvkObyT EaOjQQ7zTmebQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F096F180038 for ; Sat, 6 Jan 2024 08:38:36 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 6 Jan 2024 08:38:36 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8AE293200AFD for ; Sat, 6 Jan 2024 11:38:02 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Sat, 06 Jan 2024 11:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1704559082; x=1704645482; bh=62TjaspIPiXHUrgYDN6uM BoFBOmgwSbhsD3E+RXBoUg=; b=p8dZx4V30CxXcSBUeKSC+41BT9aub2fT/9FXk 4Zvr2nYkILHRcwlIDbLq/aQhPXixCYHbfieckSa0VFaVvPBuqC3oqHdPg9RvWtal 9G0pGaSLvUT8uYb97ZQ1ByAY1cR1unWd/G7O5afA/VAjA8mQYl5N1xMz2L+qXe/x c1g0BG0tYiK67NPqoTo6roecwsiXAISR73HHti3SNiMAmRIeYFKiWv0G2LNu4WoA KfjS20lC34pJyW9hFkAFaQL+aPuEzZYz80NBNYSwB7oRc+mXdGMjbAoYnI/mX9jh DgZHb8OiAAdd1gM3ywSwIm+x0jPcycKCbN5tclNpPdFFs+Xaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704559082; x= 1704645482; bh=62TjaspIPiXHUrgYDN6uMBoFBOmgwSbhsD3E+RXBoUg=; b=G sqJCnlRS/MwKVQexe3v+W4SqtXjDO9KCThEKzvXO/Zqm9a8FES3ohvJfswc+ZJUc oXC+qcU4pasG5FAk+09beS8/IwR9Tvv6O/eiN4u58Pvpx2LsYxVaWhVFNtDNPHnr Fai62OMvVlIal7nuBvxyGalWY0AqD3Dorweq7jFTSdjInxldQY/D8A2gnfB82Lt+ YwNO/tnEx/XODzhQ0kvM0auDNlYL2GmguFAj1Jz38+hwvYcLcFT2DU/ENrou6Rs3 nPSWABCcB92wf0HxlsAnvy9VnB7gIaH/PPwYz4XdbSTsJswokNqxtS/qSOc4Qnux cpZj8OHdADF4d6lDiDQbg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehuddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepofgfggfkjghffffhvffu tgfgsehtqhertderreejnecuhfhrohhmpedfnfgrrhhrhicuifgrrhhfihgvlhgufdcuoe hlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqnecuggftrfgrthhtvghrnhep ueevhfeihedvleejudehgfeuffdvffevgfffgffgleeuhfffvddtgfetkedvgefhnecuff homhgrihhnpeefvheglhdrohhrghdpphhhphdrnhgvthenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvg gthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 856B41701C6D; Sat, 6 Jan 2024 11:38:01 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 MIME-Version: 1.0 Message-ID: <9745baab-6a1d-48a4-88eb-bbe0e76aa47c@app.fastmail.com> In-Reply-To: References: <4B81D2EE-0A84-4443-8F32-5D27AE43954C@gmail.com> <56eeb603-418c-4455-81c7-9bfbd160d6e2@app.fastmail.com> Date: Sat, 06 Jan 2024 10:37:40 -0600 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Fwd: [PHP-DEV] clarify the destructuring list() concept From: larry@garfieldtech.com ("Larry Garfield") On Fri, Jan 5, 2024, at 6:22 PM, M=C3=B6n=C3=B4me Epson wrote: > Thank you for your reply. Forgive me for a few mistakes. I'm new to > Gmail... Is this line "top-post" ? Yes. Top posting means putting your reply above what people have sent p= reviously. On many mailing lists, including this one, that is discourag= ed as it makes the thread harder to follow. Instead, put your responses= inline between parts of what you're replying to, or at the very end. T= hen remove any parts of the previous messages not relevant to what you'r= e responding to. > Le sam. 6 janv. 2024 =C3=A0 00:48, Larry Garfield a > =C3=A9crit : > >> What you can do, as Rowan noted, is this: >> >> https://3v4l.org/cEmcC >> >> I understood your code. It is interesting when you do not know the or= der > of the keys. > https://3v4l.org/O29NL > I would have preferred to be able to write: > https://3v4l.org/o5jkH > In the same way I do it here: > https://3v4l.org/I4V3W > > I don't see any concrete case where using a variable as a key can be u= seful > https://3v4l.org/WR54k > > For me it was implemented like this, because it's easier. > > In reality, I'm not asking "how" it actually works, but how it should = work. As Rowan notes, how it does work currently is critical, because we need = to avoid breaking existing code. Adding functionality is fine and good,= but breaking people's code is not, outside of some very controlled edge= cases. > list() supports destructuring assignment for arrays. Do you have an op= inion on object destructuring ? Object destructuring would be better done using pattern matching. Work = is already in progress on that, though it's not yet ready: https://wiki.= php.net/rfc/pattern-matching I get the sense that's much closer to what you are looking for. --Larry Garfield