Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118936 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96604 invoked from network); 1 Nov 2022 09:06:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Nov 2022 09:06:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9A38F1804F7 for ; Tue, 1 Nov 2022 02:06:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 1 Nov 2022 02:06:05 -0700 (PDT) Received: by mail-wm1-f41.google.com with SMTP id ja4-20020a05600c556400b003cf6e77f89cso662014wmb.0 for ; Tue, 01 Nov 2022 02:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=EFsH51X5vDnEmO2eU12lgoT7/OdG7/jb/j4h2ZE9sHQ=; b=RfPSrXA6Gr9TxmCYSBWd7w6SQmP7em04DfzAOOSdOD3aLxsXmCRWaAXZxD3ejobVRu mtZmJP9V0Rc2hl+np5BG1dSd/1LXrrH4JGEszihoZQ5PYc0Qr/UU3qY37trPFYtdSWeE DvOKWD2ADbPWWsO7LW7JEeUBe9G7dRVWFbz2BPl1OJv1mbOiuYgKsg4RO4oI/fS0eOk4 OF6iWSTBNGH1PWPZllJ1svEEAmHOCkyCWGOlAmotrTCEg3upUnHX3R2yYaL1WlUIyUUY owegeBKjZTJsPxjgBSGhfRJ+hiJZQW36e8oTIq5LRwXty3gSH67EDMsY64k08i7zLDVd juZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EFsH51X5vDnEmO2eU12lgoT7/OdG7/jb/j4h2ZE9sHQ=; b=mPzLnASfhMtGDr+xUrfE/klaRVMBrTU6U39O2gutl07cVHbCWql+idyfY19a4G/NsR ImBhk56cVrAmAzGppoo3BLwoTFn+PT2r6voaB0u0oQrq18MYuxgVOOEByNBoT8aIZJdt Pr5tA6wdTI+HG3OLLy9LTVBIpN2IB7iNKqpcQ9XcKiqmMHPDY6qybx6c87PW1QjC7yUZ pB0X1vqdjOkPeqDZlkGaHonTLTW+2EKRQlYH242vgHd7kmjE/HjCL1feKNIrVI+bX0a1 BtIkRe99J9SF4YUKPVV+64Q6PNUK+xHKe5Y85tLiCHGgXFY8aKq7moFReQdUz741432I 8CPg== X-Gm-Message-State: ACrzQf2Eaqw6bKRB4E65tktsuYqSl5kKXn0jXsyknydvovP2RnsBfelG rSyEmQzI4Tf0o/jsSZ+34uL5wY2ZeCg= X-Google-Smtp-Source: AMsMyM6ofKHS9n46u2c+69CTQP19+eCd9IyB1jbv9vgHuk8WdDFaZeh43gPSEvOrEXutfPrSRyKrQw== X-Received: by 2002:a05:600c:538a:b0:3c6:c223:7ec5 with SMTP id hg10-20020a05600c538a00b003c6c2237ec5mr11332166wmb.37.1667293563761; Tue, 01 Nov 2022 02:06:03 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id u13-20020a056000038d00b00236c1f2cecesm8482998wrf.81.2022.11.01.02.06.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 02:06:03 -0700 (PDT) Message-ID: <24696c26-2758-deb3-2d0e-3944728365eb@gmail.com> Date: Tue, 1 Nov 2022 09:06:02 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Destructuring Coalesce From: rowan.collins@gmail.com (Rowan Tommins) On 01/11/2022 00:05, Bob Weinand wrote: >> Am 16.10.2022 um 23:11 schrieb Bob Weinand : >> >> Hey, >> >> I've written a small RFC about adding coalesce ability to list() destructuring. >> >> This should enhance the ability to easily, concisely and readably destructure arrays with default values. >> >> https://wiki.php.net/rfc/destructuring_coalesce >> >> Bob > Hey, > > Given haven't heard much feedback, I'll open the vote by end of the week, > > Bob Unless I'm missing something, the one response you did get contained some questions that you didn't answer? As for my own reaction: the simple examples look useful, and maybe are enough to include the feature. I find nested destructuring a bit confusing to read at the best of times, and some of the examples like [[$a ?? "default"] ?? []] = $array make me go a bit cross-eyed, but you make a reasonable case for the choice of semantics, and I don't really have a strong reason *not* to allow it. Regards, -- Rowan Tommins [IMSoP]