Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-27 Thread Larry Wall
Aaron Sherman writes: : Here's an example syntax: : : FOO: for x { : BAR: for y { : my $foo_under FOO:= $_; : print $_, $foo_under; : } : } I think if we have to go through contortions to get at the outer topic by name, it's better to just name the variable on the outer loop in the

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-27 Thread Eric Roode
Larry Wall writes: I think if we have to go through contortions to get at the outer topic by name, it's better to just name the variable on the outer loop in the first place. Adding - $varname to the outer loop is safe, because it doesn't change the semantics of topicality--now that we

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-27 Thread Larry Wall
Eric Roode writes: : Larry Wall writes: : I think if we have to go through contortions to get at the outer topic : by name, it's better to just name the variable on the outer loop in the : first place. Adding - $varname to the outer loop is safe, because it : doesn't change the semantics

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-26 Thread Larry Wall
Aaron Sherman writes: : On Thu, 2002-03-21 at 12:52, Allison Randal wrote: : On Wed, Mar 20, 2002 at 09:59:35AM -0800, Larry Wall wrote: : : I should update y'all to my current thinking, which is that $_ is : always identical to the current topic, even if the topic is aliased to : some

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-21 Thread Allison Randal
On Wed, Mar 20, 2002 at 09:59:35AM -0800, Larry Wall wrote: I should update y'all to my current thinking, which is that $_ is always identical to the current topic, even if the topic is aliased to some other variable. To get at an outer topic, you'd have to use the same mechanism we'll use

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-20 Thread Larry Wall
Allison Randal writes: : On Thu, Feb 28, 2002 at 03:17:19PM -0600, Garrett Goebel wrote: : I do worry that as Perl grows richer, so does the need for underlying : consistency and simplicity. : : You're not alone in that. : : I guess it is all about seeking the correct balance. And that is :

RE: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-02-28 Thread Garrett Goebel
From: Allison Randal [mailto:[EMAIL PROTECTED]] On Wed, Feb 27, 2002 at 04:24:48PM -0600, Garrett Goebel wrote: From: Allison Randal Not just some value external to the switch, but the value in $_. I now see the DWIM aspect. Thanks BTW. But how often will people have non- Cwhen

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-02-28 Thread Allison Randal
On Thu, Feb 28, 2002 at 03:17:19PM -0600, Garrett Goebel wrote: I do worry that as Perl grows richer, so does the need for underlying consistency and simplicity You're not alone in that I guess it is all about seeking the correct balance And that is something Larry and the Perl community

RE: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-02-27 Thread Garrett Goebel
Dang... why isn't you see so many more obvious errors, the moment after you click send? From: Garrett Goebel [mailto:[EMAIL PROTECTED]] or without the special case: $hi = 'hello'; $x = 'burt'; for $hi - $y { given { when /burt/ { print Go Away }; default { print $y };

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-02-27 Thread Allison Randal
On Wed, Feb 27, 2002 at 04:24:48PM -0600, Garrett Goebel wrote: From: Allison Randal Not just some value external to the switch, but the value in $_. I now see the DWIM aspect. Thanks BTW. But how often will people have non- Cwhen statements within a Cgiven scope that'll need the