Hi Matthew,
On 23 February 2015 at 16:01, Matthew Weier O'Phinney wrote:
> Today, without scalar type hints, we end up writing code that has to first
> validate that we have something we can use, and then cast it. This can often
> be
> done with ext/filter, but it's horribly verbose:
>
> $va
hi Matthew,
On Mon, Feb 23, 2015 at 8:01 AM, Matthew Weier O'Phinney
wrote:
> I'm writing this as an author and maintainer of a framework and many
> libraries.
> Caveat, for those who aren't already aware: I work for Zend, and report to
> Zeev.
> If you feel that will make my points impartial,
Matt,
>> And what about other languages that have exactly this behavior? Such
>> as Go/Hack/Haskell/etc. Do you see casts everywhere? No. You see them
>> where it needs to be explicit. Otherwise, people just write using the
>> correct types.
>>
>> And it also hand-waves over the fact that the same
On Mon, Feb 23, 2015 at 6:21 PM, Matthew Weier O'Phinney
wrote:
> On Mon, Feb 23, 2015 at 10:21 AM, Anthony Ferrara
> wrote:
>
>
> > And what about other languages that have exactly this behavior? Such
> > as Go/Hack/Haskell/etc. Do you see casts everywhere? No. You see them
> > where it needs
On Mon, Feb 23, 2015 at 10:21 AM, Anthony Ferrara wrote:
> And what about other languages that have exactly this behavior? Such
> as Go/Hack/Haskell/etc. Do you see casts everywhere? No. You see them
> where it needs to be explicit. Otherwise, people just write using the
> correct types.
>
> And
Matt,
> The big problem currently is that the engine behavior around casting can lead
> to
> data loss quickly. As has been demonstrated elsewhere:
>
> $value = (int) '100 dogs'; // 100 - non-numeric trailing values are
> trimmed
> $value = (int) 'dog100'; // 0- non-numeric value
Hello,
I'm writing this as an author and maintainer of a framework and many
> libraries.
> Caveat, for those who aren't already aware: I work for Zend, and report to
> Zeev.
> If you feel that will make my points impartial, please feel free to stop
> reading, but I do think my points on STH bear s
This is first answer that makes sense for community needs.
Em 23/02/2015 13:01, "Matthew Weier O'Phinney" escreveu:
> I'm writing this as an author and maintainer of a framework and many
> libraries.
> Caveat, for those who aren't already aware: I work for Zend, and report to
> Zeev.
> If you fee
I'm writing this as an author and maintainer of a framework and many libraries.
Caveat, for those who aren't already aware: I work for Zend, and report to Zeev.
If you feel that will make my points impartial, please feel free to stop
reading, but I do think my points on STH bear some consideration.