[Types-sig] Non-conservative inferencing considered harmful
skaller
skaller@maxtal.com.au
Thu, 23 Dec 1999 08:21:29 +1100
Paul Prescod wrote:
>
> * if a variable is consistently assigned a particular type within its
> scope, we inference the type.
> * if a variable is inconsistently assigned we infer it as "Any"
I'd like to suggest ONE extra case worth considering:
* particular type OR None
The reason I suggest this, is that it is common enough
for either None or a single type to be used, for example,
often function parameters have a default of None.
It would be a pity to lump this case into the case Any.
--
John Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
voice: 61-2-9660-0850