Re: Improving PHP's type system
| From: | Tom Worster | Date: | Fri, 15 Apr 2016 15:59:11 +0000 |
| Subject: | Re: Improving PHP's type system | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92337@lists.php.net to get a copy of this message | ||
On 4/13/16 5:06 PM, Stanislav Malyshev wrote:
I agree. This is an important point. I should include it in my RFC[1] that argues pro nullable return but contra nullable params or unions. May I copy-paste? Tom [1] https://wiki.php.net/rfc/nullable_returnsTypes are designed in a way enhancing the languages experience while avoiding nearly every impact for people who want to ignore them.This is not true. If it's in language, you have to understand it to be able to use the language. Nobody writes code in vacuum - there are libraries, communities, teams, best practices, tutorials, etc. So if (hypothetically) you want to introduce algebraic types in PHP, then since that moment you can not really be a PHP programmer if you don't understand algebraic types. Otherwise you would not be able to communicate with the rest of the community, understand and use code written by others, contribute to projects, etc.