Re: Types on the right or on the left
| From: | Stas Malyshev | Date: | Tue, 04 Nov 2014 18:33:19 +0000 |
| Subject: | Re: Types on the right or on the left | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78665@lists.php.net to get a copy of this message | ||
Hi!
> Because if that function has a return type, e.g.:
>
> public function Foo bar()
>
> Then you couldn’t grep for “function bar” because of the Foo.
And that's not what I have proposed. Would anybody actually *read* what
I am proposing? Or reading is optional for discussion now?
> If we used this syntax instead, which wouldn’t disrupt grep:
>
> public Foo function bar();
>
> It’d be inconsistent with normal function declarations which would have to have Foo after
> function.
What's "normal function" and why it would have to have "Foo" after
function? What's wrong with "Foo function bar()"? It reads nicely (at
least in English, where the natural word order is adjective-noun, not
noun-adjective), it does not disrupt any searches, what exactly is wrong
with it?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/