Re: Request for comments - new PHP feature: return typing

From: Date: Wed, 10 Jul 2013 08:07:28 +0000
Subject: Re: Request for comments - new PHP feature: return typing
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-68086@lists.php.net to get a copy of this message
On Wed, Jul 10, 2013 at 1:42 AM, Sara Golemon <pollita@php.net> wrote: > I know this conversation kinda stopped a couple weeks ago, but I want to > throw into the ring that HHVM already has a syntax for return type hinting > and it'd be awesome if we (with my PHP hat on) brought the two > implementations together rather than take them further apart. > > In HHVM's case a function might look something like: > > function foo(SomeClass $bar, int $baz) : bool { > > } > Hi Sara, Thanks for the input. While playing with GO I did found that this type of syntax is a bit better. 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? Or better yet, rewrite it with a HH VM in mind? I know and fully understand it's a gigantic task but at some point in a software lifecycle there's only so much patching up you can do before you can't patch it anymore. Thanks. Best regards, Florin ---- Florin Patan https://github.com/dlsniper http://www.linkedin.com/in/florinpatan

« previous php.internals (#68086) next »