Re: Re: [RFC] Union Types v2
| From: | Benjamin Morel | Date: | Sat, 26 Oct 2019 10:44:32 +0000 |
| Subject: | Re: Re: [RFC] Union Types v2 | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107703@lists.php.net to get a copy of this message | ||
>
> As they are runtime checks, would an ini setting where they can be
> completely disabled be feasible? So during development and in production
> when the performance decrease doesn't matter, I can have the full runtime
> type checking. But when absolutely needed, the checking can be disabled.
Note that I would personally never disable these checks in production, as
they may prevent potential bugs down the road, that would not have
necessarily been caught in dev.
I would rather expect PHP to bring down the cost of these checks in
production to a negligible level, as mentioned in my previous message
(static analysis and JIT).
— Benjamin
On Fri, 25 Oct 2019 at 10:09, Peter Bowyer <phpmailinglists@gmail.com>
wrote:
> On Thu, 24 Oct 2019 at 13:47, Rowan Tommins <rowan.collins@gmail.com>
> wrote:
>
> > I think this performance impact is a real concern; PHP is the only
> language
> > I know of which implements type checks entirely at run-time in production
> > code, and we should ask ourselves if that's definitely the right
> approach.
> >
>
> As they are runtime checks, would an ini setting where they can be
> completely disabled be feasible? So during development and in production
> when the performance decrease doesn't matter, I can have the full runtime
> type checking. But when absolutely needed, the checking can be disabled.
>
> Peter
>