Re: Improving PHP's type system
| From: | Bob Weinand | Date: | Wed, 13 Apr 2016 20:52:48 +0000 |
| Subject: | Re: Improving PHP's type system | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92267@lists.php.net to get a copy of this message | ||
> Am 13.04.2016 um 22:24 schrieb Stanislav Malyshev <smalyshev@gmail.com>:
>
> Hi!
>
>> May I suggest you the following article (more of a starting point into
>> Ceylon actually) regarding this topic:
>
> There was a time where PHP was considered a good beginner's language.
> Now it seems we want to pivot and target category theory PhDs instead? :)
> --
> Stas Malyshev
> smalyshev@gmail.com
PHP has and will retain the invaluable capability of not requiring types.
If you have weak types, which you have by default, it's just about as easy as it was the last
15 years.
The only thing which changed is that not only internal functions but also user functions can impose
some limits on what is being accepted. I could understand your complains if it were completely new
and not even internal functions ever rejected inputs based on types [or rather how well-formed
numeric strings they are].
The only thing a bit harder (requiring a little understanding of types), is when you edit files with
strict types active. But still, if that's too much of pain for a beginner, he's free to
disable them.
Types are designed in a way enhancing the languages experience while avoiding nearly every impact
for people who want to ignore them.
And that's great.
And that's why we shall continue on improving our *optional* type system.
Thanks,
Bob