On Thu, Jul 2, 2009 at 5:26 AM, Ilia Alshanetsky<i...@ilia.ws> wrote:

> 1) Strict type hinting helps to solve bugs, both the ones made out of
> careless/missing validation as well as subtle logic bugs that often take
> hours to resolve. I can tell you that within a week of implementing type
> hints we've been able to identify 30-40 bugs within a period of day. Many of
> which would not have been detected with "flexible" type hints that Paul is
> suggesting here is one example:

I think you might not have read what I suggested (it is different than
the one I emailed to you privately). What you want is fully supported.
If you must be passed an int, use the +int hint.



> type. The code also includes bits from PEAR and external libs like fpdf and
> guess what those have no type hints and they work along side with type
> hinted code without any issues.

It is instructive that PEAR could not use your proposed hints. The
"flexible" system would work fine though.



> situations. Of all the replies I see no objection so far and the only
> complaint (funnily enough) is about existence of IS_NUMERIC.

Yes. Nobody wants numeric. It doesnt hint at anything.


> I do not wish to start a flame war or arrive at a wishy washy compromise
> that does not provide a solid solution. If the majority disagrees with the

I think my "flexible" system is not a wishy washy compromise (the one
I sent you by private email was). I think rather it has all the
advantages you want, all the advantages I want, and even supports what
Stas wants.



> 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.



Please, take a read over my full proposal. I think you'll find it that
it supports everyone's features without compromise.

Thanks,
Paul


-- 
Paul Biggar
paul.big...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to