Re: Using Other Channels (was Scalar Type Declarations v0.5)
| From: | Pierre Joye | Date: | Thu, 19 Feb 2015 18:16:13 +0000 |
| Subject: | Re: Using Other Channels (was Scalar Type Declarations v0.5) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83232@lists.php.net to get a copy of this message | ||
On Thu, Feb 19, 2015 at 10:02 AM, Lester Caine <lester@lsces.co.uk> wrote:
> While typing this I did think to just scrap what I was writing, but I
> think it is relevant if only if someone can explain why I am wrong?
>
> On 19/02/15 17:06, Anthony Ferrara wrote:
>>>> With strictly typed $a and $b, the expression drops to 1 possible
>>>> >> permutation. And you can detect if it's a valid one. And many static
>>>> >> analysis engines do this.
>
>>> > I didn't see any proposal that proposes strictly types variables. As for
>>> > parameters, both strict and coercive typing provide knowledge about the
>>> > types of parameter inside the function they are defined in, so no
>>> > advantage to strict typing here.
>
>> It's not about how data gets in, it's about how data moves once it's
>> in. It's about knowing how types change and flow into other functions
>> that's important. Because that lets you determine more data about the
>> stable (non-error) state of the application.
>
> With much of this it is what validation needs doing where. Data coming
> into the process can either be well constrained, or totally random.
> Pulling stuff back from a database,
This is not the point of this discussion. What you referto has to be
done for anything PHP uses, every library, every extension or services
(http or other).
Cheers,
--
Pierre
@pierrejoye | http://www.libgd.org