Re: Removing the concept of "optional any"

+∞

/be

Mark S. Miller wrote:
> These would not be my expectations. Rather, the issue (once again!) is 
> parametricity vs partial parametricity. If a function takes any first 
> class value as argument and treats it the same way, I'd expect it to 
> be declared "any". If a function takes any first class value as 
> argument, but then case switches its behavior depending on whether the 
> value was undefined, I would expect it to be declared as "optional any".
>
> For example, although aMap.set(aKey, undefined) means the same thing 
> as aMap.set(aKey), .set's length should be 2 and its second parameter 
> should not be considered optional.

Received on Wednesday, 19 February 2014 21:59:08 UTC