Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123337 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 qa.php.net (Postfix) with ESMTPS id AAA481A009C for ; Fri, 17 May 2024 18:07:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715969316; bh=M+cXA+AY40A5luEpnem8QFVRJYscfm6YYbcEfvQKRtE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=moYfrnJZcc1pV/1Yf1GSEyblv/qPJdofzsbuMxGKflbmVAAj08qu0qcPmAPVTvso2 jwGfuXQeQhLok33WreaXlKcH26KLVQsTd1aqUSMiKbhFwDxbju0FOaNSHPVpSMeSIq xn4n5AZ2bpjKA5Pexc3OxdjlNwfm6zYbjQlJ9lmpD1pSH/ivlW+qCW2ogcuBO5qB53 cmMezTxFb6MlP7WM+LJMiPR0GOuEPG9jO2CZU9ipDZi5WNeHFN4NSDTaks4cupnlYZ XEB3OWdAHZB2DBSBUezpUf7ApeMb0adsXDwemXQjg/YuHh+rZu4o6JWKMFLuG8l5cp 38ML6bpr6o8jQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 32CA1180041 for ; Fri, 17 May 2024 18:08:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 17 May 2024 18:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1715969257; bh=rMHMdP+ojx1tclXLiKjrlAAPM/o+nL1BijeVxcP7Gg4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=PqCAd6aeb4O9a1BrL7ubQ189eTbE7sz+J2ZnZLRznG5+8QsFJvx85xh0cI94O86Ob EmCaSrKXV3DSlgwfhFfsrLEyiWE1exFnrXbeOOEKFS1X1EnLCc07nJxMA0D43EeRz0 DQTkaUp/5glZn6dED+Q1tg/HuzS8CetaC+j4wzjOkcTU9UY9+sUUK/K+kfGwud3vdi fbUKOP9CHYtQuQzNClSwq1p7k9zxOudKQu+Otq5f+LbR5005lC1LjvMby6cq5epbAk 1AFaJJHUsbdC/OyF6+KN8AcH0qObuMDMfQPp4OotqJR029xeSclOo7+4kv1cpPSUx/ XlkGKUKa1t7GA== Message-ID: Date: Fri, 17 May 2024 20:07:35 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [Discussion] Clone with To: Andreas Hennings , php internals Cc: Larry Garfield References: <280bcea8-9483-4191-80d3-81763a988290@app.fastmail.com> <5db38bc4-a6fd-4cb7-b10d-3ad1a590888c@app.fastmail.com> <39511e44-93cb-4fde-b0ec-ce24ee88f4be@app.fastmail.com> <07b0f341-f062-45fe-ade0-52cf75003895@app.fastmail.com> Content-Language: en-US In-Reply-To: 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 On 5/9/24 15:10, Andreas Hennings wrote: > The syntax is well suited for the most common case, which is regular > wither methods for one or more known properties. > I don't like the array syntax as a default. It has inferior DX for > regular withers, and possible performance impact from the temporary > array. Again [1]: The choice of syntax cannot influence runtime performance after the code is compiled, because it is just that - syntax. It would be perfectly possible to specifically handle the case where the 'with' is followed by an array literal and then not construct a temporary array. In fact this is how the current implementation works: It doesn't actually support arrays yet, it just borrows the syntax of an array, because it more naturally extends to supporting arrays in the future. Best regards Tim Düsterhus [1] See also my previous email: https://externals.io/message/120048#120073