Re: if, loop, and lexical scope

2004-06-29 Thread Alexey Trofimenko
On Tue, 29 Jun 2004 10:52:31 -0400, Jonadab The Unsightly One <[EMAIL PROTECTED]> wrote: People who think in terms of "statements" often get mixed up when they put complex expressions in void context, expecting them to be treated as statements. print(2+3)*7; is another example. Perl doesn't ha

Re: if, loop, and lexical scope

2004-06-29 Thread Jonadab the Unsightly One
John Williams <[EMAIL PROTECTED]> writes: > $b = 'a'; > my $b ='b' , print "$b\n"; > print "$b\n"; > > Which seems to show that the "my $b" doesn't actually come into > scope until the end of the statement in which it is defined. The comma operator doesn't guarantee order of operation becau

Re: if, loop, and lexical scope

2004-06-28 Thread Luke Palmer
Luke Palmer writes: > Alexey Trofimenko writes: > > of course, I just mutter.. new C is very good, and in special > > cases, when simple incrementing-decrementing isn't what I want, I can > > write my own iterator (btw, in which apocalypse I can find how to > > write iterators in perl6?) with m

Re: if, loop, and lexical scope

2004-06-28 Thread Luke Palmer
Alexey Trofimenko writes: > of course, I just mutter.. new C is very good, and in special > cases, when simple incrementing-decrementing isn't what I want, I can > write my own iterator (btw, in which apocalypse I can find how to > write iterators in perl6?) with my own custom very special incr

Re: if, loop, and lexical scope

2004-06-28 Thread Alexey Trofimenko
On Mon, 28 Jun 2004 06:42:47 -0700, David Storrs <[EMAIL PROTECTED]> wrote: On Sun, Jun 27, 2004 at 03:16:11PM -0600, Luke Palmer wrote: But anyway, if you still want to be old school about it, then you'll end up not caring about the scope of your $i. Really you won't. And you'll be happy that

Re: if, loop, and lexical scope

2004-06-28 Thread Jonathan Scott Duff
On Mon, Jun 28, 2004 at 11:10:03AM -0600, John Williams wrote: > On Sun, 27 Jun 2004, Luke Palmer wrote: > > > Alexey Trofimenko writes: > > > AFAIR, I've seen in some Apocalypse that lexical scope boundaries will be > > > the same as boundaries of block, in which lexical variable was defined. >

Re: if, loop, and lexical scope

2004-06-28 Thread John Williams
On Sun, 27 Jun 2004, Luke Palmer wrote: > Alexey Trofimenko writes: > > AFAIR, I've seen in some Apocalypse that lexical scope boundaries will be > > the same as boundaries of block, in which lexical variable was defined. > > Yep. Except in the case of routine parameters, but that's nothing new.

Re: if, loop, and lexical scope

2004-06-28 Thread David Storrs
On Sun, Jun 27, 2004 at 03:16:11PM -0600, Luke Palmer wrote: > > But anyway, if you still want to be old school about it, then you'll end > up not caring about the scope of your $i. Really you won't. And you'll > be happy that it was kept around for you once you decide you want to > know the val

Re: if, loop, and lexical scope

2004-06-27 Thread Luke Palmer
Alexey Trofimenko writes: > AFAIR, I've seen in some Apocalypse that lexical scope boundaries will be > the same as boundaries of block, in which lexical variable was defined. Yep. Except in the case of routine parameters, but that's nothing new. > > so, my question is, what the scope of var