Re: {....} if condidion

2000-08-31 Thread Nathan Wiger
> >We already have a trailing if statement, so this argument is edgy, at > >best. > > Your brain/eye can look one statement. It's evil and wrong to make > it look infinite statements forward. How can you pretend those are > the same? Well, I think trailing statements already have only limited

Re: {....} if condidion

2000-08-31 Thread Jonathan Scott Duff
On Wed, Aug 30, 2000 at 10:58:45PM -0700, Nathan Wiger wrote: > We already have a trailing if statement, so this argument is edgy, at > best. The only thing that it can't do is easily span multiple lines and > expressions. Any reason why not other than style? Seems like the obvious > extension.

Re: {....} if condidion

2000-08-31 Thread Decklin Foster
Tom Christiansen writes: > Look closer: do { ... } while does not require the reader to > scan down to find out the condition *BEFORE* the loop is > entered. With an if, it does. I believe what he's saying is that do { ... } requires the reader to scan down far enough to see if there is a whil

Re: {....} if condidion

2000-08-30 Thread Tom Christiansen
>> You don't want do have a postfix { ... } if condition. It's evil >I don't see how this is any worse than a postfix while() Look closer: do { ... } while does not require the reader to scan down to find out the condition *BEFORE* the loop is entered. With an if, it does. >> Because it hide

Re: {....} if condidion

2000-08-30 Thread Nathan Wiger
> You don't want do have a postfix { ... } if condition. It's evil I don't see how this is any worse than a postfix while() do { asd; asdf; asdf; asf; asdf; asdf; sad; fasdfa; sdf; asdf; asdf; asf

Re: {....} if condidion

2000-08-30 Thread Tom Christiansen
You don't want do have a postfix { ... } if condition. It's evil to have do { asd; asdf; asdf; asf; asdf; asdf; sad; fasdfa; sdf; asdf; asdf; asf; asdf; asd; as;

Re: {....} if condidion

2000-08-30 Thread raptor
> >$x =10, $z =15 if $y > 12; # 8 click shorter > > Should work now. I just tested it in 5.6, but I think that's been valid > since Perl4 or earlier. ]- yep my mistake...sorry :") > >instead of this : > > > >if ($y > 12) {$x =10; $z =15} ; > > > >4 keyboard click shorter - Shift+( and Shift+)

Re: {....} if condidion

2000-08-30 Thread Buddha Buck
At 05:52 PM 8/30/00 +0100, raptor wrote: >hi, > >We now can say : > >$x = 10 if $y > 12; > >It will be good if this also work.( i.e. block before if ). > >{$x =10; $z =15} if $y > 12; do {$x = 10; $z = 15} if $y > 12; works. >or > >$x =10, $z =15 if $y > 12; # 8 click shorter Should work now.