More string indexing semantics issues

Maciej Stachowiak mjs at
Wed Jun 25 13:52:05 PDT 2008

On Jun 25, 2008, at 9:37 AM, Allen Wirfs-Brock wrote:

> Garrent: Thanks for the pointer to your analysis. Do you have any  
> others that identify issues that could potentially be fixed in ES3.1?
> I think in this case I have to agree with Maciej...Webkit appears to  
> be doing the "right thing" by making a string appear to consistently  
> have a set of numerically named readonly properties that exactly  
> correspond to the elements of the string value.
> In a clean-slate world, I think that should be the end of the  
> discussion.  However, we have backwards compatibility issues to  
> consider.  By the book ES3 allows numerically named properties to be  
> added to String objects that are unrelated to the string value, and  
> 2 out of the 3 widely used browser-based implementations that  
> support property style access to the string value also allow such  
> properties to be added.  Only Webkit deviates from this.  Right or  
> wrong, from a pure compatibility perspective preserving that  
> capability would be important **if we think that there is any  
> significant usage of it**.  The fact that Safari seems to be getting  
> away with its implementation without being badgered into conformance  
> suggests that there probably isn't any such significant usage.
> So, unless someone has some evidence that it is going to "break the  
> web" I'm going to leave by ES3.1 specification the way it currently  
> is written, which implements the observed behavior of Webkit.
> Maciej: I assume you haven't heard of any significant web content  
> being broken by this behavior.

I have not seen any reports of such problems. If it were common to  
put random numeric properties on String objects, I expect we would  
have had a bug report by now.


More information about the Es4-discuss mailing list