Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129545 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 958881A00BC for ; Thu, 4 Dec 2025 12:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764851708; bh=3piOxRXhEU1hCc3dNs+yE5p/mPkUyPv/gH0ca3h6T5E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hD5fCTgAKCaDEf/yZ5PsFERSsvbScqXGcw5UW8WIby5uGt3BbHvN9ODKa6cPcdsnb 7Q5VkxsAzTpoCke1qsuZmBfjfQzUfFRg2bmaY+CxraPvYxrZZN10/nUlDytf1vEt2P tJXlj1FFMHFUThwojgglc4yQc7m5nJQZVhDrj+FMOyLr2ula8ht5rJCTkWCnUite5+ 4lexuno6/OzKvF2JwwIivgbFvo2HxloIOY4vty862VkRGHki8GzXbp+GoxMMpMPk2U lVPjA8wyb6dxBnCFXv+9GkrlpAz4/vkocuL2jfNx/BINZap722O1eGDC/RvlXpwdoV sZQowbk9arQWw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2C438180055 for ; Thu, 4 Dec 2025 12:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Thu, 4 Dec 2025 12:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1764851698; bh=+O5rfBZaSQfkLtJyx6dvwYT9UiQUYk1ngsBdM1T3uHA=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=e1bxUg5NApugIdr4JQd8WoyQ6y+U32ReeD4khR22SQMwu/r7c/uIc8HsTqvYxLIxw Trqgy8UbMh0hM+EIca49gZPvVjgyz4ynG6toO8SrETG1n3rPq7yfYnuAD2Hogxl20T ycUbqJ7Syy6Hw2mB/wt4/gSg/etoLjO8Q7CicVJ65cZnZNKils9D5tId7eXotpigcs PHFFGvor6LyQ4P0H31Bs/gs7nyk6Dyz/9tBU3MFGpFV3XCLbwT3RbDngd187mqotY9 9wbrVOCY5nKOTaacxt2WgKPPxL/X5s7xM/zkoY4YojM69P6dH9DaeSjqLIlwwDhtuR gpMy/73O8CkMw== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 04 Dec 2025 13:34:54 +0100 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Pattern Matching In-Reply-To: References: Message-ID: <4e4b210a2b7156d6613b82a7e8ebd9b7@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-12-02 21:06, schrieb Larry Garfield: >> 2. Maybe some parts of the RFC could be separated to reduce >> complexity. >> Thinking about variable pinning. > > Actually, with the new implementation variable pinning turned out to be > stupidly easy. That was a convenient bonus, which is why we included > it in the initial RFC. It was originally in future scope, but the diff > to add it was like 10 lines or something, so we included it now. The > future-scopes that are still in future-scope are all "harder than they > look" or "deciding what exactly to do will be a lot of discussion", > which is why they're there and not in the base release. There are different dimensions to complexity. Your reply focuses on just “implementation complexity”, but there's also “documentation complexity” or “deciding-how-the-syntax-should-look complexity”. I feel that the syntax for “variable pinning” specifically has the weakest arguments in favor of it, with the main argument being “Ruby has it” rather than “it makes sense”. The other syntax choices either are “obviously correct” or have good arguments backing the choice. Best regards Tim Düsterhus