Hi, On Thu, Feb 5, 2015 at 2:06 AM, Stanislav Malyshev <smalys...@gmail.com> wrote: > Hi! > >> We are talking about adding support for scalars (string, integer, ...) >> to the list of optional type declarations already supported (array, >> callable, interface name, class name) by PHP. When a developer chooses >> to use a scalar type in the signature of a function or method then it >> should be enforced as strictly as the already supported types. It should >> be up the caller to perform explicit type casting when required. > > That is contrary to the nature of PHP as it has been a weakly typed > language for 20 years. I think it would be a big mistake to change one > of the basic concepts of the language, that has worked pretty well > judging from it adoption.
Adding another concept, not changing the existing ones. And really, it's just simplifying what is already present via is_<typename>() runtime checks, making our lives a little bit easier. Though, I should re-iterate - I'm not in favor of picking just one of the two possibilities. > Especially given that all internal functions > do not and will not work this way. Unless you propose make internal > functions work this way too, in which case it'd be much better to change > the name of the project, because there won't be much left that connects > it to prior PHP and you can pretty much forget about BC. Cheers, Andrey. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php