Re: [RFC][Discuss] Arrow Functions
| From: | ilija dot tovilo at me dot com | Date: | Sat, 04 Feb 2017 16:19:34 +0000 |
| Subject: | Re: [RFC][Discuss] Arrow Functions | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98186@lists.php.net to get a copy of this message | ||
Hey Stephen
> You’re really starting to lose me now. You want types but don’t want to define them, and
> you’re somehow mixing phpdoc into this.
Because we use PHPDoc to provide type hints to the IDE where PHP doesn’t support them yet
(variables and properties).
> Currently PHP has zero support for Foo[] (or array<Foo> if you prefer) as a type hint. In
> *theory* an IDE could use the calling scope’s context (assuming the source of the array is purely
> local or from arguments/return values that are typed) to infer types, but I haven’t seen it, and I
> would likely still use type hints, to cover the case where something changes elsewhere.
That’s because you don’t trust it ;) You should be able to trust it.
But anyway, that’s beside the point. Let’s get back to the RFC.
> What were you saying about not everyone being the same?
What I’m saying is that maybe it would make sense to vote for syntax, as this would make most
people happy.
People seem to complain about that the most but agree with the general idea of the RFC.