Re:We will try to stop fixing bugs in PHP
by Too on Friday June 22, 2012 @01:09AM
(#4145512)
BOTH behaviors don't make sense. The right behavior is to throw an exception.
[ Parent
| on HN ]
Absolutely agree, and that's PHP's biggest issue. It is constantly doing things like this instead of simply complaining and stopping things down like any sane system would.
If I were in charge of PHP, release 6 would be 5.4.4 with the standard library happily throwing exceptions on invalid input. That's it. The language would be 100% more useful instantly.
As mentioned to parent: then you'd have a lot of work to do to clean up one even more widely used language : )
You mean JavaScript, right? Reading this conversation I was wondering how no comment would point at the same or bigger similar issues in JavaScript.
This depends on language. Or you'd have to dismiss at least on widely used systems programming language as well. : )
Well...if we are allowed to change language completely we could change to a type safe language (as most systems programming are) and we wouldn't have this discussion in the first place since it would be impossible to call the function with a string parameter...