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

From: Date: Wed, 26 Jun 2013 13:38:59 +0000
Subject: Re: Request for comments - new PHP feature: return typing
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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)

« previous php.internals (#67869) next »