W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2014

Re: Removing the concept of "optional any"

From: Brendan Eich <brendan@secure.meer.net>
Date: Wed, 19 Feb 2014 13:58:37 -0800
Message-ID: <5305290D.1050103@secure.meer.net>
To: "Mark S. Miller" <erights@google.com>
CC: Domenic Denicola <domenic@domenicdenicola.com>, Boris Zbarsky <bzbarsky@mit.edu>, Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC