[OT] (was: Re: implied looping)

2005-11-23 Thread Ruud H.G. van Tol
Larry Wall: > I can see the mathematical appeal of coming up with a language in > which there is a meaning for every possible combination of tokens. Yes, that sounds like my language. I agree it's not Perl. And not a lot of other things too. > It's a counterintuitive fact > that languages that

Re: implied looping

2005-11-23 Thread TSa
Larry Wall wrote: On Wed, Nov 23, 2005 at 06:21:56PM +0100, Juerd wrote: : Larry Wall skribis 2005-11-23 9:19 (-0800): : > ^5.each { say } : : Without colon? Yeah, that one doesn't work a couple of way. Unfortunately .each still binds tighter than ^ too. So it'd have to be: (^5).ea

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Larry Wall
On Wed, Nov 23, 2005 at 06:21:56PM +0100, Juerd wrote: : Larry Wall skribis 2005-11-23 9:19 (-0800): : > ^5.each { say } : : Without colon? Yeah, that one doesn't work a couple of way. Unfortunately .each still binds tighter than ^ too. So it'd have to be: (^5).each: { say } unless w

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Juerd
Larry Wall skribis 2005-11-23 9:19 (-0800): > ^5.each { say } Without colon? Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Larry Wall
: c. (0..4) { say; say } : d. @{0..4} { say; say } : (etc.) : : b. now produces 2 lines with 01234 (in pugs). Which is wrong by the current spec, by the way. It should be a syntax error to have two terms in a row. Bare parens can't be function args unless they're abutted or u

Re: implied looping

2005-11-23 Thread Ruud H.G. van Tol
Ruud H.G. van Tol: > b. { say; say } (0..4); > > b. now produces 2 lines with 01234 (in pugs). With implied looping > that would be 10 lines, starting with two 0-lines. Standard: do {say; say} for 0..4 for 0..4 {say; say} Wishful: (0..4) ยป{say; say} pugs doesn't see

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Michele Dondi
On Wed, 23 Nov 2005, Ruud H.G. van Tol wrote: for ^5 { say } # 0, 1, 2, 3, 4 The 'for' can go if a list (and also an array) would imply looping, when it is positioned next to a block: a. say (0..4); b. { say; say } (0..4); I'm not really sure: while I like it for its conciseness -and

implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Ruud H.G. van Tol
ith 01234 (in pugs). With implied looping that would be 10 lines, starting with two 0-lines. -- Grtz, Ruud