AW: [PHP-DEV] Types on the right or on the left
| From: | Robert Stoll | Date: | Tue, 04 Nov 2014 08:37:37 +0000 |
| Subject: | AW: [PHP-DEV] Types on the right or on the left | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78614@lists.php.net to get a copy of this message | ||
> -----Ursprüngliche Nachricht-----
> Von: morrison.levi@gmail.com [mailto:morrison.levi@gmail.com] Im Auftrag von Levi Morrison
> Gesendet: Montag, 3. November 2014 19:54
> An: Robert Stoll
> Cc: PHP Internals
> Betreff: Re: [PHP-DEV] Types on the right or on the left
>
> > Thoughts?
>
> I think you didn't follow the mailing list or read the return types RFC carefully if you
> think putting the return type before the
> function name is good at all. Also, why are you starting this conversation now instead of
> months ago or even a couple
> weeks ago when I asked for feedback on the latest return types RFC?
>
> Lastly, I want to say that compatibility with Hack is only one consideration of all things
> considered. Please don't let that
> guide your thoughts too far one way or the other.
>
You obviously took it the wrong way, I did not intend to attack your RFC. Besides, I wrote an email
to you in private mentioning that it is an inconsistency, but that this should not stop your RFC
(and thus I have written it in private and did not mention it on the list).
The discussion I wanted to start is not about your RFC, it is about what direction PHP wants to go
when it comes down to further type hints, put types only on the right, or only on the left or mix
it.
I followed the return type RFC and thus know that many people think it has to be on the left hand
side. Fair enough, I do not have anything against such a decision. I also have nothing against
putting the type on the right hand side. What merely bothers me is that it would be another
inconsistency in the language design. It's not very intuitive for a user if a type hint is once
on the right hand side and once on the left hand side.