RE: [PHP-DEV] Introducing "Array Of" RFC
Hey Lazare
> -----Original Message-----
> From: Lazare Inepologlou [mailto:[email protected]]
> Sent: Monday, January 20, 2014 10:54 AM
> Cc: internals
> Subject: Re: [PHP-DEV] Introducing "Array Of" RFC
>
> Hello,
>
>
> on 2014/1/16 Sara Golemon wrote:
>
> > * Soft types - Any type preceeded by an at sign is hinted as that type,
> > but not checked:
> > function foo(@Bar $IHopeYoureABarObject) {...}
>
>
> Nobody has commented so far about this feature of HHVM, which, in my
> opinion is a win-win:
>
> + Clarifies the contract between the function designer and the function
> user.
> + Makes the life easy for IDEs and static analysis tools.
> + No run-time penalty.
>
> Thoughts?
>
I think it suits PHP very well but that would definitely be a different RFC.
And btw. "soft" type hints would not work for typed arrays (since this can only be checked
during runtime
Thread (73 messages)