On Wed, Aug 15, 2012 at 12:01 PM, Stan Vass <sv_for...@fmethod.com> wrote: > Just like with argument typehints. > Point me to an argument typehint that is required for your code to run. > > You and Stas keep giving arguments against argument typehints, which is > really awkward.
As already pointed out repeatedly, argument typehints serve the purpose of defining an interface. No, they are not required to run the code, that's true. But they still serve an important purpose for object oriented programming (and, just to make sure that you don't miss it again: That purpose is defining the interface). Variable typehints do not, as far as I can see. > I gave an example validating an array of Foo instances, which the current > system doesn't solve. Yes, and your system doesn't solve it either, or does it? As the validation does not happen through a parameter typehint it does not help defining the public interface. It only helps the IDE know the type (which doc comments can also do). Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php