Re: Request for comments - new PHP feature: return typing
On 26 June 2013 15:35, Julien Pauli <[email protected]> wrote:
> On Wed, Jun 26, 2013 at 2:58 PM, Patrick ALLAERT <[email protected]
> >wrote:
But what Sherif said proves as well the limits of the idea. PHP is not
> strongly typed. So each check, should it be type hinting or return type
> hinting, has to be done at runtime , which is bad for performances.
>
> Not talking about the type juggling which could lead the programmer as
> shooting himself.
>
> Julien.Pauli
>
What about disabling the check in some environments (prod)? It would work
like an assertion I suppose. (Feel free to shoot at me if you think it's a
bad idea)
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
Thread (35 messages)