Re: optional type hinting enhancements

From: Date: Mon, 19 Jan 2009 12:46:25 +0000
Subject: Re: optional type hinting enhancements
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-286655@lists.php.net to get a copy of this message
On 19.01.2009, at 00:00, Nathan Rixham wrote:
Jochem Maas wrote:
Nathan Rixham schreef:
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?
can I give a +1 for you making a request to start a RFC on the matter ... I'm sure LKS will give you perms to set up one on wiki.php.net/rfc.
lukas, thoughts? [ini proposals coming in a minute, just diff'ing]
i do not determine what things are worthy of an RFC. i just handle granting the karma to anyone who wants to write one. so just register .. btw: http://wiki.php.net/rfc/typehint regards, Lukas

« previous php.general (#286655) next »