Re: optional type hinting enhancements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux