Re: type hinting
| From: | Pierre | Date: | Sun, 06 Jan 2008 22:28:51 +0000 |
| Subject: | Re: type hinting | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34561@lists.php.net to get a copy of this message | ||
On Jan 6, 2008 11:15 PM, Stefan Priebsch <stefan.priebsch@e-novative.de> wrote:
> Pierre schrieb:
> > I don't see the point to make a application working when you pass to
> > it the wrong data, it is a bad usage. That was the moto for the
>
> So how are you going to deal with the "bad usage" then?
> Isn't the
> problem that this "bad usage" is discovered at runtime, vs at compile
> time like in Java? If you don't deal with these errors, you effectively
> "crash" your application.
That what happens now with the numerous fatal errors. That's not the
case with an E_RECOVERABLE error. PHP has no compiler and all errors
will be see at runtime, even fatals like missing classes, functions,
methods, wrong interfaces or bad usages of set/getters.
--
Pierre
http://blog.thepimp.net | http://www.libgd.org