At 22:54 11/08/2010, Josh Davis wrote:
On 11 August 2010 20:40, Zeev Suraski <z...@zend.com> wrote:
> Josh,
>
> This too (having both options) was debated many times. Read the archives.
I have already read the archives thank you very much. I'm sure you
have too and you remember that there's never been a consensus. I'm
sure that Derick remembers them as well, yet he restarted the
discussion instead of letting it rot in limbo.
Consensus about what? About two similar features with slightly
different syntax being a bad thing? I don't think we need consensus
for that. That's not up for discussion. It's an axiom for PHP.
> Short version? Strict typing is evil. The only thing that's even worse?
> Adding both Strict typing and something else. Why? You get everything
> that's bad about strict typing, combined with the added confusion of two
> ways of doing similar things.
That's your opinion and I beg to differ. I find that having both type
of "typehints" is having the best of both world at almost no cost. I
am no more confused by the use of parentheses in a method's
declaration than I am by their use in a if construct, in a new Foo()
instantiation or used anywhere else in PHP.
Knowing the difference between different constructs is part of
learning a language (just like learning that $a==$b and $a===b are
different) and I don't see librairies meant to be used by beginners
use strict typechecking anyway. In all likelihood, it will only be
used by users and frameworks that want the greatest degree of control
over their own code, possibly using strict typechecking for internal
stuff and "weak" typehinting (smartcasting!) for public APIs.
See above. It would do everyone good if they don't just think about
themselves and whether they're fine or not with a given feature, but
about the impact it would have on the userbase at large.
Zeev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php