Hi!

> 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.

I agree, this is not a very good situation. It would be much better to
take a systematic approach to this, but this is impossible since there
is no systematic approach to strict typing in PHP, just some pieces here
and there. I think this is not right, but obviously many people here
disagree and are happy to have the inconsistent syntax. I don't see why
"public Foo function bar()" would be so much worse than "public function
bar() : Foo"  but for some reason this possibility wasn't even
considered as far as I can see.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to