Le 11/05/2021 à 16:50, Chase Peeler a écrit :
On Tue, May 11, 2021 at 10:48 AM Matīss Treinis <mrtrei...@gmail.com> 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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to