Hi!

> If the first could be useful, the second could be useful too. Or you are
> saying that parameters type hinting was a bad idea?

Given how it is understood now - as a first step to make PHP a strongly
typed language - yes, I'm starting to think it was. If it was understood
as it was intended - as a small hack to catch obvious code failures -
then it'd be OK (not that great, but fine) idea, but given that more and
more people misunderstand it as declaration of intent for PHP to be
strongly typed language - I think maybe we would be better off not doing
that after all.

> Last thing: I agree with Clint and you. If it was early checked, it
> would be better. But the current type hinting is far better than nothing
> at all. Yes, we can't "lint" it, but it was pretty useful a big number

No, it's not better. Having code that can randomly fail with one error
message is not better than having code that can randomly fail with
another error message. It is more or less the same. It can actually be
worse since it'd introduce more boliterplate checks in wrong places
(i.e., you'd have to check every variable for correct type before
assigning it to typed property) and does not provide any control over
how the situation when something is wrong is going to be handled.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to