Originally Posted by
cpradio
I agree with that. However, I also think that full type safety would be hard to implement in PHP since it isn't really a compiled language. Granted I guess once you start to serve up the page the JIT could find the errors and report them, but if you ask me, that is too late (from a developer perspective). That is one reason I really enjoy C/C#, I love the instant notification I can get by simply compiling my code.
Also, granted, several IDEs are very capable of detecting these errors on your behalf before your code is asked to be rendered/compiled too, so you could argue it could still be implemented on that level too. But I digress, if your IDE did that, do you really need full type safety? Wouldn't type hinting with IDE support for detecting errors be enough? The only thing I dislike about that idea, is you are separating responsibility, PHP is responsible for continuing type hinting, and IDEs are responsible for ensuring your code sends appropriate values to your type hinted methods, classes, etc. -- Seems very dirty.