[Types-sig] Non-conservative inferencing considered harmful

Greg Stein gstein@lyra.org
Wed, 22 Dec 1999 13:54:29 -0800 (PST)

On Thu, 23 Dec 1999, skaller wrote:
> 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.

Agreed, but I believe Paul's response would simply be "then declare it."

But then: I have different thoughts on the base issue :-)


Greg Stein, http://www.lyra.org/