Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109449 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 32738 invoked from network); 30 Mar 2020 10:57:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Mar 2020 10:57:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 18FC41804C4 for ; Mon, 30 Mar 2020 02:23:41 -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,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 30 Mar 2020 02:23:40 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id b12so745924ion.8 for ; Mon, 30 Mar 2020 02:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oR6PYJme1XkfPWm72YFiUR2dAjZeNGDQJsUKAc298Wg=; b=n+ouWUgWSGeLwP0cBdYRY2iLgr33DiD0I+l/069nUi45dnTIvEh1wGrLJ4YBMPJkD9 m6e652o2HlPSOha/lTawVxlIw1QO6CECHVhfn3oCcrvepD+p3iWrTbMORQ4oS1cm3KJJ 5E6q7w77ivWYbTOl5zmLvqlojaLUY/Rrc9wFmA3rAkKdY/HDzFPXEfWWIWJ9YU9cmT3P 3kVj9Kd1B/opfHPxtgds54S2WSBs2xQdAwmL0HLNq2vFL5qJrXgobJrDDbXVx4U1ZpXx fR08AX3IYUWT4spXgd24lcXYHaJXzC6kmqS8YUsmK7jUJQXjEJ1UQQu65NgI2CfQXLl1 /7dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=oR6PYJme1XkfPWm72YFiUR2dAjZeNGDQJsUKAc298Wg=; b=dgUiqXsmP1woQB1ZEx98m/EHmcUWwFm/rTKwsE50WubfQqvoaPlN481YmrVvzbSDNW nr4PNmxBi4LqY7x94VmJ5rCQDCK0Mq45dhRKviNBiVeWc8e9W8P3lDiRTzz+ASSMbf+2 fqLlxWTc2i28cmY1qwGTQ1KxEDhs1wrm5yh+rfIUA9JiuR7z2J15pcgcUrF9O2UBsBde /EsF2KquJMr3rckas/qh35Rer3uQW8bIR5chhuwSQhjSD3aopNUQ0P7ceamWlSYeEcSK cJp+EG3UhhaOnXwzKvyWZEiXIDvu1HFfYTJCje5N49Pqk6Zg1UUZ6Y0locVRcJNJg/vi HFRw== X-Gm-Message-State: ANhLgQ0yLzTB+LAi0ulE+kxKWhH0uQRYEi6i9Xq7mJN7zJ6Hxp1iJAkD wjCDTrsVdCTBITXaa/WPZMVh8VWwdxFCIc0jQlyEww== X-Google-Smtp-Source: ADFU+vvHQ6YzcoKfeujqIWWF9y6qJTj5X8gx00M+7rE4SzwJNyqIBqpJVvB5yc0Nil4inE1KEA8G94vpg0IH4CYVfhQ= X-Received: by 2002:a6b:8d50:: with SMTP id p77mr9697399iod.143.1585560216762; Mon, 30 Mar 2020 02:23:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 30 Mar 2020 10:23:23 +0100 Message-ID: To: php internals Content-Type: multipart/alternative; boundary="0000000000007d7e6a05a20f0177" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment From: rowan.collins@gmail.com (Rowan Tommins) --0000000000007d7e6a05a20f0177 Content-Type: text/plain; charset="UTF-8" Hi Jakob, On Sun, 29 Mar 2020 at 21:57, Jakob Givoni wrote: > > I understand and fully agree that COPA is narrow, but I don't really > understand why that's a problem - I proposed it exactly because I felt that > its simplicity is its force. > Low hanging fruit is usually something I would encourage to go after. > I believe it's a trivial implementation that can help in uncountable > situations where you just need to assign values to a predefined data > structure in a single expression. > > I'd really like to hear the arguments against such a cost-benefit > calculation. > Others have said it reasonably well, but for me, a key point is that it reserves a new syntax, with no obvious way of reusing that syntax for any wider features in future. That weighs in on the cost side of the calculation, because syntax is a somewhat limited resource - we often have problems adding things without ambiguity in the parser, and a language with lots of single-purpose syntaxes is going to be harder to learn than one with a few multi-purpose syntaxes. If COPA was the first part of a wider set of complementary features, building on it as a base, it would be more attractive to me; but as currently proposed, it feels like any new feature in this area (object initialisers, named arguments, etc) would have to compete with it instead. Regards, -- Rowan Tommins [IMSoP] --0000000000007d7e6a05a20f0177--