>> Examples?
>>
>> http://fvue.nl/wiki/Bash:_Passing_variables_by_reference , I like that.
>
Very interesting. This reminds me of reflection in Java. Something
difficult and dangerous to use, so you never use it directly. Instead
you ask a framework or a library ( ~= "upvar" ) to use reflection f
On Wed, Nov 10, 2010 at 6:37 PM, Marc Herbert wrote:
> Chris F.A. Johnson:
> > I find the bash behaviour more logical, and I do use it in scripts.
>
> Examples?
>
> http://fvue.nl/wiki/Bash:_Passing_variables_by_reference , I like that.
Eric Blake:
> On the Austin Group mailing list, David Korn (of ksh93 fame)
> complained[1] that bash's 'local' uses dynamic scoping, but that ksh's
> 'typeset' uses static scoping, and argued that static scoping is saner
> since it matches the behavior of declarative languages like C and Java
> (dy
Eric Blake wrote:
In static scoping, function f2 does not shadow a declaration of a, so
references to $a within f2 refer to the global variable. The local
variable a of f1 can only be accessed within f1; the behavior of f2 is
the same no matter how it was reached.
If it matters (I already kno
On 11/9/10 4:52 PM, Eric Blake wrote:
> On the Austin Group mailing list, David Korn (of ksh93 fame)
> complained[1] that bash's 'local' uses dynamic scoping, but that ksh's
> 'typeset' uses static scoping, and argued that static scoping is saner
> since it matches the behavior of declarative langu
On Tue, 9 Nov 2010, Eric Blake wrote:
On the Austin Group mailing list, David Korn (of ksh93 fame)
complained[1] that bash's 'local' uses dynamic scoping, but that ksh's
'typeset' uses static scoping, and argued that static scoping is saner
since it matches the behavior of declarative languages