<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">There's no problem making 
`of` contextual provided you use a restricted production:<br>
<br>
<span><meta http-equiv="content-type" content="text/html; charset=UTF-8"><div
 class="gp">
        <div class="lhs"><span style="font-style: italic;"><meta 
http-equiv="content-type" content="text/html; charset=UTF-8"><span 
class="nt">RelationalExpression</span></span> <span class="geq">:</span></div>
        <div class="rhs"><span class="nt">    </span><span><span><span 
style="font-style: italic;"><span class="nt">RelationalExpression</span></span></span> </span>
 <span class="grhsannot">[no <span class="nt">LineTerminator</span> 
here]</span> <code class="t">of</code> <span><meta 
http-equiv="content-type" content="text/html; charset=UTF-8"><span 
style="font-style: italic;" class="nt">ShiftExpression</span> </span><sub
 class="g-params"></sub></div>
      </div></span><br>
See 
<a class="moz-txt-link-freetext" href="http://wiki.ecmascript.org/doku.php?id=harmony:egal#is_and_isnt_operators">http://wiki.ecmascript.org/doku.php?id=harmony:egal#is_and_isnt_operators</a>
 where we noticed that restricted productions allow the contextual use 
of new keyword-operators without breaking backward compatibility.<br>
<br>
/be<br>
<br>
<br>
Bergi wrote:
<blockquote cite="mid:5519A7F5.20609@web.de" type="cite">Brendan Eich 
schrieb:
  <br>
  <blockquote type="cite" style="color: #000000;"> From <a 
moz-do-not-send="true" class="moz-txt-link-freetext" 
href="https://plus.google.com/+IanBicking/posts/PbXDtNF9Gg6:">https://plus.google.com/+IanBicking/posts/PbXDtNF9Gg6:</a>
<br>
<br>Huh, "for (attr in obj)" goes along with "if (attr in obj)", but 
"for
<br>(item of array)" doesn't have an equivalent "if (item of array)"
<br>
<br>It's obvious in hindsight. An `of` operator …
<br></blockquote>

  <br>
I would like such an operator as well, but I can see a big problem with 
this proposal: "of" is not a reserved keyword.
  <br>
And it certainly has its usage as an identifier name already, most 
prominently: Array.of.
  <br>
The fantasyland applicatives 
  <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" 
href="https://github.com/fantasyland/fantasy-land#applicative"><https://github.com/fantasyland/fantasy-land#applicative></a>
 do have such a 
method as well. I found a few uses of it in github code 
  <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" 
href="https://github.com/search?l=javascript&q=%22var+of+%3D+%22&ref=searchresults&type=Code"><https://github.com/search?l=javascript&q=%22var+of+%3D+%22&ref=searchresults&type=Code></a>
 
(most of those thousands are false positives or a particular test case, 
this example 
  <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" 
href="https://github.com/ELLIOTTCABLE/from/blob/fb19155abbf39e91a532537599d3d16f592e16b6/lib/from-new.js#L96"><https://github.com/ELLIOTTCABLE/from/blob/fb19155abbf39e91a532537599d3d16f592e16b6/lib/from-new.js#L96></a>
 
is not).
  <br>

  <br>
 Bergi
  <br>
</blockquote>
</body></html>