Re: Array.prototype.indexOf use of SameValue()

2009-04-28 Thread Mark S. Miller
On Tue, Apr 28, 2009 at 11:34 AM, John-David Dalton wrote: > In the ECMA 5 RC spec I noticed that 15.4.4.14 Array.prototype.indexOf > (and lastIndexOf) make use of the SameValue operation. > The spec states that (9.12)  SameValue will return true If Type(x) is > Undefined or Null. The steps which

RE: Array.prototype.indexOf use of SameValue()

2009-04-28 Thread Allen Wirfs-Brock
The first step of SameValue is 1. If Type(x) is different from Type(y), return false. undefined, null, and number are 3 distinct types so SameValue(null,1) -> false and SameValue(undefined,1) -> false >-Original Message- >From: es-discuss-boun...@mozilla.org [mailto:es-discuss- >b

Array.prototype.indexOf use of SameValue()

2009-04-28 Thread John-David Dalton
In the ECMA 5 RC spec I noticed that 15.4.4.14 Array.prototype.indexOf (and lastIndexOf) make use of the SameValue operation. The spec states that (9.12) SameValue will return true If Type(x) is Undefined or Null. Would this not cause an issue with 9c of the Array.prototype.indexOf spec. "c. If S

RE: Indexed string pseudo properties and for-in, was RE: Comments on April ES5 final draft standard tc39-2009-025

2009-04-28 Thread Allen Wirfs-Brock
You may be right, that an additional note is warranted. However, being in a contentious mood I'll also argue that these are indeed properties of string objects. If [[GetOwnProperty]](P) says P is a property that then it really is one. In other words: P is the name of a own property of