Re: Request for comments - new PHP feature: return typing
> While playing with GO I did found that this type of syntax is a bit better.
>
Yeah, we played with a few formats (including the one originally proposed
and found some issues (like specifying closures as return types: function
function($foo, $bar) ($foo) { return makeCallback($foo); } Even if you
add <> around the return type, that's still a bit.. weird.
> Since you brought up the discussion, would you think it would make
> more sense to actually start and integrate HHVM into PHP rather that
> patching it up?
>
HHVM isn't built on PHP (apart from a few very small pieces) so
"integrating" it would mean, well... replacing it. It's like suggesting to
integrate linux into windows. :p
> Or better yet, rewrite it with a HH VM in mind?
>
I do think we (again, wearing my PHP hat) should look at plugging in LLVM
or something similar. In my perfect world PHP and HHVM both have enough to
offer that users get to use the tool most appropriate for their needs. For
HHVM that means working on the build system and the runtime. For PHP that
means speeding up and extending the language. We'll never match because
the two projects don't agree on every piece of philosophy, but we can try
to keep close enough to avoid major issues for end users.
-Sara
Thread (35 messages)