On 29/03/11 09:40, Aryeh Gregor wrote:
On Mon, Mar 28, 2011 at 10:47 AM, Tim Starling tstarling@wikimedia.org wrote:
We can use features from both, using function_exists(), like what we do now with PHP modules.
Well, yes, if there's some reasonable fallback. It doesn't work for features that are useless if you have to write a fallback, like various types of syntactic sugar. For example, the first features from PHP 5.3 release notes include namespaces, late static binding, lambda functions and closures, NOWDOC, a ternary operator shortcut, limited goto, and __callStatic. If Facebook didn't implement some of those new features in Hiphop by the time we could feasibly require PHP 5.3, we wouldn't be able to use them. (Some look really nice, like anonymous functions -- one of the things I really like about JavaScript.)
Yes, that's true, and that's part of the reason I'm flagging this change on the mailing list. Domas says that the HipHop team is working on PHP 5.3 support, so maybe the issue won't come up. But yes, in principle, I am saying that we should support HipHop even when it means not using new features from PHP.
PHP 5.3 might be cool, but so is cutting our power usage by half (pun intended).
-- Tim Starling