At 11:40 AM 01-25-2002 -0600, Jonathan Scott Duff you wrote:
>On Fri, Jan 25, 2002 at 11:57:25AM +0100, Bart Lateur wrote:
> > On Mon, 21 Jan 2002 15:43:07 -0500, Damian Conway wrote:
> >
> > >What we're cleaning up is the ickiness of having things declared outside
> > >the braces be lexical to the braces. *That's* hard to explain to 
> beginners.
> >
> > But it's handy. And that was, until now, what mattered with Perl.
>
>No, handiness still matters with Perl. It's just that the balance has
>tipped a wee bit towards the consistency/regularity/simplicity/whatever
>side of the scale.
>
>Besides no one has commented on Steve Fink's (I think it was him) idea
>to store the result of the most recently executed conditional in $?. I
>kinda like that idea myself. It makes mnemonic sense.
>
>But then I'm sure that someone will come out of the woodwork and say
>"What about if ((my $a = foo()) && ($b < 4)) ?" or something.  To
>which I'd say "Fooey!"  I personally don't think that an extra set of
>curlies are too high a price for getting rid of weird scoping rules.
>But that's just me.

We have
  while (foo()) -> $a {...}
doing the right thing.

Why can't

if foo() -> $a { ... }

take the place of the perl5

if (my $a = foo()) {...}

Too bad we can't do

while (foo() -> $a) && ($b < 4) { ... }
and have it do the right thing.



>-Scott
>--
>Jonathan Scott Duff
>[EMAIL PROTECTED]

Reply via email to