Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120080 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7166 invoked from network); 20 Apr 2023 14:18:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Apr 2023 14:18:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2727C180211 for ; Thu, 20 Apr 2023 07:18:07 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 20 Apr 2023 07:18:07 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C06F05C016C for ; Thu, 20 Apr 2023 10:18:06 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Thu, 20 Apr 2023 10:18:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1682000286; x= 1682086686; bh=g+1VeP2cFUcyD2VGIzp3Xov3Zk/699gTnSrIzmFXLPM=; b=S mT1I3JvIwN/IdWfaB8Vn5xqVKFEZtF7lyonk1alAnwDVLw4TcNBiyq2XVlYDzzIW iQ3dJjrF5gL0+3VQ1gNQLNowpdB3YMUmfY7CxJgZZ2CY7tnLgtV+Gt/BNOTid3WH YM4ZqufU0ivcJX29tncVHaQQcIJmjzoaPcKHYK3gaOO4RirTU56N1sutJay+LOq6 ueADQJJIn8EyWoMTx2SR2dc5GSn8JBXNzeGSngV0ZQPtn5DJfFIp4bRTiaQBFHZK md41e8gtL0TNJDkRLGjF634Mk5Yjldhk7J1mDEkVwlKIeP9V8jLoblJFJ0nFZLJN F+lj9smQ4rn39/7nOogpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682000286; x=1682086686; bh=g+1VeP2cFUcyD 2VGIzp3Xov3Zk/699gTnSrIzmFXLPM=; b=hknFamGqNPu/erTA7rwLO/kTyv0wP kU32qrsl+ZAHctxKEC07AlUMR5TJJsgCOBzFEdpVQFLSsy+N8TqZ0+RPZv1S6wXt qxiI1XcKGZrEG2KxWArSgqDMZ1C8yJJiakSDZJ2gnpEDJMPHEn2zMXaWCkAu4+UD EcCV5w4DWoSgGn7t2lWXovQxRO4bJ1+Vn+Kx0Y/44p9O/od95TuPkhgXWEkp5U0x SjBCJTmltEIKkbvY6TS4MpxSFLLjWlBvIPnGYk6lEKl/20O00chvIXoQh5jLHYXY mlv+NMjJ/XTZJIlveOl397gJBRcCg8IrcTGSs8beVlExLQbJ1lLLx0JMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtvddgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 857231700089; Thu, 20 Apr 2023 10:18:06 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-372-g43825cb665-fm-20230411.003-g43825cb6 Mime-Version: 1.0 Message-ID: In-Reply-To: <14DCA246-277A-44EC-B3A5-3809C5BCC7AA@gmail.com> References: <687944e3-75ec-446b-bbd6-6d3d6856e864@app.fastmail.com> <1b842b25-c038-f647-67e1-b8c986b7d51d@bastelstu.be> <14DCA246-277A-44EC-B3A5-3809C5BCC7AA@gmail.com> Date: Thu, 20 Apr 2023 14:17:45 +0000 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] [Discussion] Clone with From: larry@garfieldtech.com ("Larry Garfield") On Thu, Apr 20, 2023, at 7:00 AM, Rowan Tommins wrote: > Rather than making everything use an array or array-like syntax, I > would probably go the other way and scrap the special syntax for > dynamic names, making the whole thing look like a function call, with > support for array unpacking: > > $point = clone $point with (x: $x, y: $y, z: $z); > $point = clone $point with (...['x' => $x, 'y' => $y, 'z' => $z]); I agree here, for all the reasons Rowan indicated. We already have a perfectly good syntax and semantics for named arguments that supports splat. Using that here would handle all the use cases we care about, including dynamic names, without any additional syntax. Let's not shoe-horn arrays in here where they're not needed. Making arrays themselves fancier/more compact with an alternate syntax is worth discussing, but that should be a separate RFC. --Larry Garfield