<?xml version="1.0" encoding="windows-1252"?>
<node id="667038" title="Re^3: &quot;When closures capture their context&quot; and &quot;scope gotchas in Javascript&quot;" created="2008-02-08 13:49:39" updated="2008-02-08 08:49:39">
<type id="11">
note</type>
<author id="345630">
Errto</author>
<data>
<field name="doctext">
&lt;blockquote&gt; I intended to learn Lua, until I found out that variables are global by default, and you have to add a keyword to limit their scope to the current sub/method.&lt;/blockquote&gt;
That's true in Perl too if you don't use &lt;c&gt;strict&lt;/c&gt;.  Well, so in Perl the alternative is lexical scope which, as I know from certain other *ahem*VB*ahem* experience, is much better than subroutine scope for most purposes.</field>
<field name="root_node">
666994</field>
<field name="parent_node">
667017</field>
</data>
</node>
