I completely agree. Strict typing doesn't fit into PHP. It was already told thousand times. Check the second requirement in RFC template https://wiki.php.net/rfc/template
Also, the only really useful case for "strict typing" is the ability to catch mistakes in user apps. However, this ability is really limited. Implementing "Design by Contact" approach may be much smarter. Thanks. Dmitry. On Thu, Feb 5, 2015 at 3: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. 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. > -- > Stas Malyshev > smalys...@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >