> On 4 Nov 2014, at 18:33, Stas Malyshev <smalys...@sugarcrm.com> wrote: > >> 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?
I suppose it’s alright for normal functions: Foo function foo() { } But it’s rather weird for closures: $foo = Foo function () { }; It’s probably doable from a parsing perspective, but it seems really off to me. Having this return type at the start of the expression doesn’t make sense to me. But this whole discussion is a little pointless given it’s not what will actually be in PHP. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php