Hi!

> Except `static function()` and `static function foo()` already have
> meaning, and if we allowed static return types (very possible) that
> would be ambiguous. This syntax is a no-go.

If it is possible, why it's not the part of the RFC? Probably because
there's not much place where it would make sense. So, the only
objections so far have been:

1. Foo function bar() somehow is not greppable
2. It is not clear that Foo function bar() means function
3. We could somehow in some undefined time in the future allow static
there, even though we're designing it right now and we actually *do not*
allow it and see no reason to allow it.
4. People would think in "Foo function bar()" "Foo" is somehow type of
the whole function, not its return value, despite PHP having no concept
of function type at all and no means to express such type and no need to
do so.
5. Using ":" is more consistent, because it's "output type", so it is
not the same as type on parameters.
6. It's inconsistent with "normal function declarations".
7. We discussed it on Stack Overflow, and decided it's not inconsistent.
8. "It is weird".
9. "It is a no go".

Does this really sound convincing argument to anybody? Because it
definitely doesn't to me.

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