OK, since I&#39;m doing some merging of code in LzNode and LzView,&nbsp; I&#39;ll remove&nbsp; superfluous&nbsp; &quot; &#39;foo&#39; in bar &quot;&#39;s when I encounter them.<br><br><br><br><br><div class="gmail_quote">On Fri, Mar 21, 2008 at 9:23 AM, P T Withington &lt;<a href="mailto:ptw@pobox.com">ptw@pobox.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You still don&#39;t need the `&#39;foo&#39; in bar`. &nbsp;If they are testing for non-<br>
nullness, they can still just say:<br>
<br>
 &nbsp; bar[&#39;foo&#39;] != null;<br>
<br>
The only thing `&#39;foo&#39; in bar` can tell you that `bar[&#39;foo&#39;]` cannot is<br>
if bar had a &#39;foo&#39; property whose value was `undefined`. &nbsp;So I think<br>
the `in` test in this idiom is superflous.<br>
<div><div></div><div class="Wj3C7c"><br>
On 2008-03-21, at 08:58 EDT, Henry Minsky wrote:<br>
&gt; What if they mean<br>
&gt;<br>
&gt; &#39;foo&#39; in bar &amp;&amp; bar[&#39;foo&#39;] != null<br>
&gt;<br>
&gt; ?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Mar 21, 2008 at 8:43 AM, P T Withington &lt;<a href="mailto:ptw@pobox.com">ptw@pobox.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I&#39;m not sure how this got started:<br>
&gt;&gt;<br>
&gt;&gt; &nbsp;&#39;foo&#39; in bar &amp;&amp; bar[&#39;foo&#39;]<br>
&gt;&gt;<br>
&gt;&gt; but it is overly-complicated. &nbsp;If &#39;foo&#39; is not `in bar`, then<br>
&gt;&gt; `bar[&#39;foo&#39;]` will evaluate to undefined (and be false), so the first<br>
&gt;&gt; test is superfluous.<br>
&gt;&gt;<br>
&gt;&gt; [Filed as LPP-5660]<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Henry Minsky<br>
&gt; Software Architect<br>
&gt; <a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br>