> On 1 Jan 2015, at 23:58, Stanislav Malyshev <smalys...@gmail.com> wrote: > >> ability to check correct usage with tooling. I'd also like to point out >> that Hack uses a strict type scheme and it seems to work well there (though > > Java uses strict typing too. And Perl has no typing whatsoever. So what? > How bringing an example of one language that does what you want is an > argument for PHP to do that? There are examples of languages doing > practically anything imaginable.
To add to what Stas says: C, in fact, has weak parameter typing. A function taking a long long can be passed a char, or a double, or even a pointer. Now, there’s a good case to be made that C’s weak parameter typing is bad. But that’s mostly because C will let you shoot yourself in the foot and overflow bounds, corrupt memory or cause a segfault. PHP doesn’t have these issues though, so that argument doesn’t really apply. By the way, “weak parameter typing” sounds like a good name for this. Makes more sense than “non-strict” or “casting”. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php