W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

Re: How to correctly spec sequences requiring an iterable

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Fri, 15 Nov 2013 10:44:39 -0800
Cc: Domenic Denicola <domenic@domenicdenicola.com>, Boris Zbarsky <bzbarsky@MIT.EDU>, Jason Orendorff <jason.orendorff@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-Id: <92D55BCC-BEB8-4A36-B088-0846377F6336@wirfs-brock.com>
To: Brendan Eich <brendan@mozilla.org>

On Nov 15, 2013, at 10:12 AM, Brendan Eich wrote:

> Jason should weigh in, but I favor for-of working on strings. They are array-like albeit frozen.

for-of requires an Iterable, not an array-like and frozen or not really isn't relevant.

But, for consistency, strings really need to work like the equivalent String wrapper for purposed of property access, so they need to work that way in for-of and all other Iterable contexts. 

> On null or undefined, I see no need for the null disjunct. Precedent outside of null == undefined is lacking - particularly for a protocol (interface) test of this kind.

In general, null is useful, if you want to be sure you don't trigger a default parameter substitution.  Don't know whether that makes much of a difference in this case

Received on Friday, 15 November 2013 18:45:15 UTC

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