optional type hinting enhancements

From: Date: Sun, 18 Jan 2009 21:34:44 +0000
Subject: optional type hinting enhancements
Groups: php.general 
Request: Send a blank email to php-general+get-286620@lists.php.net to get a copy of this message
Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properties in PHP? examples (all optional, and syntax may differ): class Example { private TypeHint $var; } Example $var = new Example(); in addition the ability to type hint primatives/scalars/[type object] in the existing implementation: function(bool $flag) { } function(object $flag) { } This would all be under the assumption and proviso that an implementation would not break bc, have any markable perfomance hit, or in any other way effect existing applications or new applications that did not use the functionality (in the same way the existing type hinting implementation doesn't) Any +1's? Regards.

« previous php.general (#286620) next »