Re: [RFC] Scalar Type Hints v0.2
| From: | Andrea Faulds | Date: | Mon, 02 Feb 2015 19:36:34 +0000 |
| Subject: | Re: [RFC] Scalar Type Hints v0.2 | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81639@lists.php.net to get a copy of this message | ||
Hi Dmitry,
> On 2 Feb 2015, at 19:26, Dmitry Stogov <dmitry@zend.com> wrote:
>
> Agree. Strict type checks are simple and may be implemented more efficient.
> But in case we have to support both - weak and strict, this won't make any advantage.
I think this still works even if we support both. The RFC’s approach means that within one file
everything is strictly-typed, for example (except in rare cases of declare() block usage).
> Static analyzers can work with weak conversion rules as well.
This is true, but weak conversion rules are less useful for error-checking in practice: for some
conversions, you can’t say AOT if they’ll work or fail, just that they’ll “maybe” succeed.
So I think analysis of strictly-typed code would be more effective.
> Anyway, this is not directly related to run-time semantic we discuss now.
This is true.
Thanks.
--
Andrea Faulds
http://ajf.me/