Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124495 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 687371A00B7 for ; Thu, 18 Jul 2024 19:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721330720; bh=whmphHj5VYCfwTrplO1/P6+stLYVTYaJOj/bJydy0b4=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=f5iCkijNqDr+vtwQJYrl2d1xybn93xFkpen8I01W2xlwId2jHI6tEOIVkQquX/OjJ LnPWOUg3h5DvX7cxJqNNF31aOxGINTIZw9uVyKgnhp5wORz6FDXUClqhtzEfrHxnow A4CEbMHwIoAmGUKbkba5deffAS4khhQfLD7SpeCv5MXj7DZx+r07gwG6gDmTIX+o10 +y4LtrrSlLKl8lJhEVo3M7Fp+hgXl1HOZTWpe2lwCfmngpsGMqcs1YUU2FROs+Xq13 Qm6xOxe/vqWMoU+79ig0K8gHTbZ89o2eyQw6SbGoViTBAUBlqy8ebDeQPa7eEgTdfy nrBbBrvDffxhA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 52B411804E3 for ; Thu, 18 Jul 2024 19:25:19 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (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, 18 Jul 2024 19:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1721330626; x=1721589826; bh=whmphHj5VYCfwTrplO1/P6+stLYVTYaJOj/bJydy0b4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=f1WkhyvOpgXrB/iuezXWH8+pZO/obZagahMJ8dVMl2DVt94eF+TPTOlEmLGjx4Zoa tY53yt8D/OHBhmIbe/hFARBfMllJkh8dVvzfKUCV1QoxwAI/nraItnctMmJH6cU8Y/ o/JM7arFlPwOaQg9gUi/gUlf79SNu1Myyur8PKlgDI5BeXAHVz4og18eM7EGEreku6 0GoRK+XVXm2ZC6SBEFKo2Cxe1qy7CoWWPaddS1jkXwKnbTfCYe7+WsOEeG/C/SeW4d Kx+SwavKpKfe78WFbshYSqXEBGz70kluywy+6Kbusjl0J4aU0eD4cT5svaOoIqsz1x ivSI2iblI/E/w== Date: Thu, 18 Jul 2024 19:23:41 +0000 To: =?utf-8?Q?Tim_D=C3=BCsterhus?= Cc: lilybergonzat+php@gmail.com, Larry Garfield , php internals Subject: Re: [PHP-DEV] Optional constructor body Message-ID: In-Reply-To: <5ad05cff-1543-4f8b-bb67-3a8d29171522@bastelstu.be> References: <5ad05cff-1543-4f8b-bb67-3a8d29171522@bastelstu.be> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: a7be5898e4c6a13794b0007986892b7e4a1f5498 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Thursday, 18 July 2024 at 19:23, Tim D=C3=BCsterhus w= rote: > On 7/18/24 16:03, Lily Bergonzat wrote: >=20 > > I feel like the more substantial one would be more likely to break > > stuff, compared to the minor one, and so I don't see why the minor one > > would be refused? >=20 >=20 > There is no such thing as a minor syntax change. Any changes to the > syntax has consequences for all the downstream tools trying to > understand PHP. This includes IDEs, static analyzers, code formatting > and linting tools, which would all need to be updated to understand the > new syntax. Furthermore the syntax would need to be documented and > translated within the PHP documentation. >=20 > That's quite a bit of effort to save a single character per class > definition. In practice it will be even fewer, because not every class > will have an empty constructor. Also whenever a class gets a non-trivial > constructor in the future, the diff would not just consist of inserting > the new code into the body, but also replacing the semicolon by braces, > making the diff less readable. >=20 > I do not think this is worth it. >=20 > Best regards > Tim D=C3=BCsterhus I am also of the same opinion. The benefit of this is marginal. And if this requires a semicolon, the benefit is even lower by effectively = just typing one less character. Best regards, Gina P. Banyard