On 02.07.2009, at 10:45, Paul Biggar wrote:
to work in a future with a library/framework that is strict about
its input
or some far fetched idea that it will change the very nature of PHP.
I don't think we are worried about it changing PHP, or about libraries
using strict type hints. We are worried that libraries will use no
hints, because the ones on offer are not useful to them.
I think he is replying to me here. I am worried that with Ilia's
proposal, people will strictly type everything, even where weakly
typed would suffice. The reason being that developers are lazy. With
these type "hints" (they are not actually hints, but "checks" as you
already made clear), they can very easily move the burden of type
juggeling explicitly to the user of their code.
At least in my world, I use a lot of 3rd party libraries, which will
then likely become essentially strictly typed. While strictly typing
can prevent bugs and all sorts of good stuff, we should be more
hesitant when it comes to giving people tools that make it easy
(encourage) to turn a core principle of PHP upside down.
I know that "numeric" was a concession to people with my concern from
the last discussion. But it doesnt cover all the bases of types. In
that vain Paul's proposal does indeed provide a syntax that at least
enables both approaches. More importantly it proposes a syntax that
requires the same number of characters for both approaches. You might
laugh at this comment, but I believe that the overuse of "private"
that I am seeing has a lot to do with the fact that its shorter than
"protected".
I have not really made up my mind about Paul's proposal, but I just
wanted to make the above points.
regards,
Lukas Kahwe Smith
m...@pooteeweet.org
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php