Re: [RFC] Mixed type

From: Date: Sat, 30 Jun 2018 20:08:02 +0000
Subject: Re: [RFC] Mixed type
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-102539@lists.php.net to get a copy of this message
Hi! > Together with Michael Moravec, we’d like to announce that we are pretending > to open the Mixed Type RFC (https://wiki.php.net/rfc/mixed-typehint) next > Monday (02/07) and we’d like to ask you to take a look into the PR on > GitHub (https://github.com/php/php-src/pull/2603) and let us know if > there's something else to do before it. I think this is wrong. This "type" - which is not really a type, of course - does not add anything to the code, by definition - if you take it out, everything would be the same. Things like that belong in the documentation. Moreover, it makes the code harder to read, as the reader should make mental effort to discard this non-type every time it is mentioned, as it does not carry any information. > In some other languages like C/C++ void can also be used as a type that accepts any type. This is wrong. void is not used in C/C++ as type that accepts any type. Moreover, void is not type at all, it means the function it describes does not accept arguments or return values. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#102539) next »