On Feb 4, 2015 6:15 PM, "Andrey Andreev" <n...@devilix.net> wrote: > > Hi, > > On Wed, Feb 4, 2015 at 1:02 PM, Florian Margaine <flor...@margaine.com> wrote: > > Hi Leigh, > > > > Le 4 févr. 2015 11:50, "Leigh" <lei...@gmail.com> a écrit : > >> > >> What was wrong with: > >> > >> function x(int $y, string $z) { // strict > >> function x((int) $y, (string) $z) { // casting > >> > >> This was the best suggestion I've seen that covers the requirements of > >> both camps, and is still very clear how data is going to be handled. > >> > >> Authors who want their APIs to adhered to strictly can do that, > >> authors who want to accept anything and have it end up as their > >> desired type can do that too. > > > > Because it is then the callee who decides, not the caller, whether or not > > he wants strict typing. > > > > ... and apparently, this is the root of all evil. :) > > I am baffled by how the two-syntaxes suggestion is always so easily > dismissed by that argument. I'd argue that most people who support the > current proposal don't fully understand what declare(strict_type=1) > really does. As I've previously said - putting the caller in control > (and really the caller, not in a per-file context) makes it a > debugging tool, not support for strict typing.
On the same line I think almost nobody here tries it. Code can make things easier to understand. On the other hand this debate has reached a sterile state. Try it, play with some small scripts, existing codes, report eventual issues (maybe related to this rfc or bugs in 7). That will help much more than what is being discussed endlessly here.