15.4.4.5 Array.prototype.join

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Fri Mar 20 09:54:59 PDT 2009


You're right, the specified algorithm (which I believe is just a restatement of the goto-based algorithm in the ES 3 spec) doesn't have any sort of recursion stopper while common implementations do.  

Do any implementers have any comments on what criteria is actually being applied?  This appears to be a case where the reality of the web differs from the specification and we should be specifying the reality.

Regarding, step 9 of joint it is "Let k be 1" in my copies.  If you may be having a problem if you are trying to filter change mark visibility to only the most recent changes.  Sometimes Word seems to get confused about what to display when filtering in that manner.

Allen

>-----Original Message-----
>From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
>bounces at mozilla.org] On Behalf Of James Graham
>Sent: Friday, March 20, 2009 6:24 AM
>To: es-discuss at mozilla.org
>Subject: 15.4.4.5 Array.prototype.join
>
>I may be missing something obvious but I can't see where
>Array.prototype.join prevents unlimited recursion in code like:
>
>a = [1,2]
>a.push(a)
>a.toString()
>
>(implementations seem to give "1,2," as output in this case).
>
>Also, step 9 of the algorithm in the current draft appears to be blank.
>_______________________________________________
>Es-discuss mailing list
>Es-discuss at mozilla.org
>https://mail.mozilla.org/listinfo/es-discuss



More information about the Es-discuss mailing list