Hi Christoph, > On 2 Feb 2015, at 22:38, Christoph Becker <cmbecke...@gmx.de> wrote: > > And frankly, I don't see what's wrong with a weak type hint in this case: > > function addVat(float $amount) {...} > > You're returning a float, anyway.
Given you’re dealing with currency, and given the fairly serious issues with precision loss with int->float conversions and vice-versa… I would be highly concerned if you used a weak type hint there. > OTOH, strict type hints would require a lot of manual conversions. Sure, they do. But they’re *explicit* manual conversions, ones you can easily grep for and that are obvious when reading code. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php