Hi! > What arguments do you have in favor of doing `<return_type> "function" > <identifier> "( <parameter_list> ")`? So far I haven't heard any
We already using "type before entity" for parameter typing, and it is a natural way to do it, both from linguistic perspective (in English, we say "green house", not "house: green") and it is the way used in all languages that PHP borrowed the concepts from, such as C, C++, Java, etc. No language I can think of (excepting Hack) does parameters as <type> <parameter> but functions as <function> : <type> - they use or always the former, or always the latter. Making PHP the only language that uses half that and half this would further add to the reputation of PHP being inconsistent and haphazard language. If we consistently used "entity : type", it would be acceptable, though detaching somewhat from PHP roots. But what is being proposed is to use half this and half that. And this is not a very good idea, IMHO. I already wrote all this in previous emails, but for those who accidentally missed them I don't mind repeating. > Other examples not already included are generics and function signatures as types. We did not see any proposal for generics or anything else, but as examples of C++ and Java amply prove, there's no problems working with generics and having this syntax. In any case, we do not have any proposals right now and any argument relating to generics whatsoever, so telling "oh, my proposal is better because generics and other awesome stuff that maybe will happen but I'm not telling now" is a meaningless argument, since it does not specify any connection between your proposal and generics - it only uses a vague dream of having generics in the future to hint at nonexistent advantage your proposal would provide in the present. -- 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