Re: [RFC] Scalar Type Hints v0.2
| From: | Andrea Faulds | Date: | Thu, 15 Jan 2015 17:02:03 +0000 |
| Subject: | Re: [RFC] Scalar Type Hints v0.2 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80574@lists.php.net to get a copy of this message | ||
Hi Matthew,
> On 15 Jan 2015, at 16:59, Matthew Leverton <leverton@gmail.com> wrote:
>
> I don't like this at all. I'd prefer raising a new warning type (e.g.,
> E_AUTOCAST) over this.
That error type would cause absolute chaos, unless people decided not to make use of it. Custom
error handlers are global and affect all code, including in libraries.
I can’t see how this would be even slightly useful.
> Does the voting system support instant-runoffs? If people could rate
> their preferences of:
>
> 1) strict scalar types
> 2) weak scalar types (auto cast)
> 3) both - different syntaxes. e.g, (int) $foo vs int $foo
> 4) no scalar types
>
> we could reach a compromised consensus without some building
> Frankenstein.
I don’t think supporting both approaches is really a “Frankenstein”. It would work out quite
cleanly in practice.
I had considered holding multiple votes, but I decided against it.
Thanks.
--
Andrea Faulds
http://ajf.me/