Re: Type hinting

From: Date: Tue, 01 Jun 2010 17:55:59 +0000
Subject: Re: Type hinting
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-48593@lists.php.net to get a copy of this message
Hi!
The "optional scalar type hinting" would raise a catchable fatal error that could be converted to an exception.
If you advocate moving PHP to full-OO with exceptions as primary error handling mechanism, it's fine - but there would be nothing "optional" or "hinting" about it - once you have one piece of code doing it, you'd have to have all code that touches it (and all code that touches that code, etc.) to be strict typed and exception-controlled. And then you'd want typed variables and "throws" clause to methods. Maybe we better rename PHP into Java and be done with it? :) -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#48593) next »