Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Pádraic Brady
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

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Pierre Joye
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,

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Anthony Ferrara
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

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Benjamin Eberlei
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

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Matthew Weier O'Phinney
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

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Anthony Ferrara
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

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Mike Willbanks
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

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Marcel Araujo
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

[PHP-DEV] User perspective on STH

2015-02-23 Thread Matthew Weier O'Phinney
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.