On Mon, Jul 14, 2014 at 1:14 PM, Alain Williams <a...@phcomp.co.uk> wrote:
> On Mon, Jul 14, 2014 at 06:09:22PM +0100, Andrea Faulds wrote: > > > > On 14 Jul 2014, at 18:01, Alain Williams <a...@phcomp.co.uk> wrote: > > > > > But if you have: > > > > > > function foo(int $a) { > > > ... > > > $a = 3 / 2; > > > } > > > > > > What do you expect $a to contain ? I would suggest integer 1. > > > I would have expected 1 - since it appears, from the code, that $a should > only contain integers. What about the current type hinting we have, then? function foo(Bar $a) { $a = 3 / 2; } Perfectly OK. Why would we treat scalars any different?