Re: Dynamic scoping (take 2)

2002-11-25 Thread Arcadi Shehter
so these two are equivalent ??? { my $x is yours ; my $y is yours ; my $z is yours ; 1... sub_a ; 2... } sub sub_a ( ; $x is yours, $y is yours ) { ...3... } ; - same as - # ( here no special meaning for "is yours" -- just another property )

Re: Dynamic scoping (take 2)

2002-11-25 Thread Larry Wall
On Sat, Nov 23, 2002 at 08:46:03PM -0600, Me wrote: : First, I'd like to confirm I've understood : C and C right: : : 1. C dynamically scopes changes to a :variable's value to the enclosing block. :It does not dynamically scope the name. :The variable can obviously be a global. :It

Re: Dynamic scoping (take 2)

2002-11-25 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > :It can also make sense if it is lexical. > :Is the latter currently allowed? > > I'm planning to allow it unless someone can come up with a good reason not to. What were the good reasons for not allowing localized lexicals in Perl 5? -- User:

Re: Dynamic scoping (take 2)

2002-11-25 Thread Me
Thanks for the clear answers. Larry: > I think that currying should be extended to > handle any caller-instituted defaulting. Argh. So obvious! (So of course I missed it.) > Basically, the parameter list of the subroutine > is already providing a limited namespace to be > shared by caller and c

Re: Dynamic scoping (take 2)

2002-11-25 Thread Randal L. Schwartz
> "Simon" == Simon Cozens <[EMAIL PROTECTED]> writes: Simon> What were the good reasons for not allowing localized lexicals in Perl 5? Nobody could explain it in 50 words or less. "What the hell is 'local my $foo = 35'?" -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503

Re: Dynamic scoping (take 2)

2002-11-25 Thread Me
Larry's earlier response means this 'yours' idea is history, but for closure, yes, this seems to be headed in the right direction, at least in theory. It may have even been practical to implement it thru the standard property mechanism. > so these two are equivalent ??? > > { > my $x is yours ; >