Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114395 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 66384 invoked from network); 11 May 2021 14:45:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 May 2021 14:45:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1E2E41804D8 for ; Tue, 11 May 2021 07:53:46 -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=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 11 May 2021 07:53:45 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id DA0CF5101324 for ; Tue, 11 May 2021 14:53:44 +0000 (UTC) To: internals@lists.php.net References: <1620635361.9147.0@gmail.com> <1620728274.110454.3@gmail.com> <1620744503.110454.6@gmail.com> Message-ID: <7eba94ce-a1ee-82e4-7960-43d3c6c3551b@processus.org> Date: Tue, 11 May 2021 16:53:44 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] [RFC][Draft] Body-less __construct From: pierre-php@processus.org (Pierre) Le 11/05/2021 à 16:50, Chase Peeler a écrit : > On Tue, May 11, 2021 at 10:48 AM Matīss Treinis wrote: > >> Hi Sara, >> >> > While it's certainly silly/pointless to have a nil constructor when >> there are non-promoted args present, I think that deliberately making >> that mode special (read: inconsistent) is the wrong way to go. >> >> Sorry, but I don't follow - so you would prefer that this: >> >> public function __construct(); >> >> be valid syntax as well, considering within the scope of the proposed? >> Am I reading this right? >> >> > Yes. It might be silly and pointless, but, it doesn't have any negative > side effects, so why not? I agree, even for all methods, if I can avoid the {} when I don't need it. To go further, for any method that return void or a nullable type, it would be a nice to have the semicolon syntax automatically returning null or void when possible, for when implementing an interface method or abstract method you actually don't need to implement. Regards, Pierre