Hello,

I'm new with php internal. Here is my first answer but i use php everyday.

I think that the return type is needed in php. When you make an interface,
why are you not sure of the return of the function made by the user ?
Of course you can specified it as comment but if you want to be sure of the
return you have to test it and when the class is implementing your
interface...

That's definitively weird, isn't it?

I use PHPStorm (and I'm probably not the only one here, haha) and love so
much the warning when I'm wrong with return type.
Why is it a feature of phpstorm and not of the language ? Weird. Again.

I hope i help !
Bye.
Le 10 juil. 2013 10:08, "Florin Patan" <florinpa...@gmail.com> a écrit :

> On Wed, Jul 10, 2013 at 1:42 AM, Sara Golemon <poll...@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
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to