[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: about the next version
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 17 Apr 2002 16:02:03 -0300
> About the scope rules: the fact that 'precise declarations' (global <name>)
> take precedence over 'default declarations' (global in <table>) can create
> strange situations. A block of code that works well in one context no
> longer works in a different one. I.e. you can't cut'n'paste a function
> from one file to another if it uses 'default declarations'. You have
> to copy the required 'precise declarations' too or you may get hard to
> find bugs.
You don't need default declarations for this problem. In most languages
you may have problems when you cut'n'paste a function from one file to
another, as its free variables can be captured by external declarations.