Array Generics and null
Mark S. Miller
erights at google.com
Mon Mar 24 10:59:10 PDT 2008
On Mon, Mar 24, 2008 at 10:31 AM, Dean Edwards <dean at edwards.name> wrote:
> It seems we have three choices for Array.forEach(null)
> 1) Do nothing
> 2) Throw an exception
> 3) Use the current object and iterate that
By "current object" do you mean the global object?
> I prefer the first one, throwing an exception is acceptable too but the
> last one is counter-intuitive IMO.
I would find either of the first two acceptable. I prefer #2.
More information about the Es4-discuss