Posted by tony on 12/21/05 12:06
>> "If it is possible to detect where some application code is wrong and
work around it instead of rejecting it completely, then this should be
implemented."
> Bzzzt. Wrong. Nothing causes more bugs than having a language
silently do something unintented. The hardest single bug to find in
PHP is a variable typo on assignment -- instead of an error you
silently create a new variable and the variable you intended to change
goes unchanged. You want to add more silent errors to PHP programs?!?
Again you are missing the point. I am not talking about the language
doing something unintended, I am talking about where the programmer has
used a variable reference which used to work but which now fails. It
has been stated that it would be possible for the language to detect
this situation but, instead of rejecting it outright, could work around
it without producing a memory corruption and produce an E_NOTICE or
E_STRICT to warn the programmer of the dodgy code. If it is possible to
allow existing code to continue working but *without* causing a memory
corruption, then this surely has a greater priority than making an
unknown number of existing scripts to fail outright.
[Back to original message]
|