Re: 'while <> {' in Perl 6

2002-08-12 Thread Leopold Toetsch
[EMAIL PROTECTED] wrote: > Question: if the compiler *doesn't* raise an error, what happens? How would > the following code be interpreted, even insanely? An endless loop perhaps? > > while something() => $_ { ... } Changing the closure to use »=>« instead of »->« yields with current P6C:

Re: 'while <> {' in Perl 6

2002-08-12 Thread [EMAIL PROTECTED]
From: Larry Wall [EMAIL PROTECTED] > (Had an interesting typo there. I put => insteaqd of ->. > I wonder how much trouble that sort of thing is gonna cause. > Maybe pairs can be disallowed or warned about where a pointy > sub might be expected.) I foresee a lot of problems. To my Perl5 eyes,

Re: 'while <> {' in Perl 6

2002-08-11 Thread Sean O'Rourke
On Fri, 9 Aug 2002, Larry Wall wrote: > (Had an interesting typo there. I put => insteaqd of ->. I wonder > how much trouble that sort of thing is gonna cause. Maybe pairs > can be disallowed or warned about where a pointy sub might be > expected.) To add to the list of helpful warnings, I ran

Re: 'while <> {' in Perl 6

2002-08-09 Thread Larry Wall
On Fri, 9 Aug 2002, Adam Lopresto wrote: : I was wondering whether the Perl 'while (<>){' idiom will continue to be : supported in Perl 6? I seem to recall people posting example code the list : using it (although I can't dig any up), but it seems to me that if Perl 6's : lazy list implementation

Re: 'while <> {' in Perl 6

2002-08-09 Thread Mark J. Reed
On Sat, Aug 10, 2002 at 02:23:07AM +0800, Christian Renz wrote: > Actually, I once found myself wondering why while doesn't set $_ all > the time anyway... It would be nice to do things like Because the logic of the while construct doesn't require any connection between the condition and the topic

Re: 'while <> {' in Perl 6

2002-08-09 Thread Christian Renz
>I was wondering whether the Perl 'while (<>){' idiom will continue to >be supported in Perl 6? Actually, I once found myself wondering why while doesn't set $_ all the time anyway... It would be nice to do things like while ($iterator->each()) { ... } while (query->nextResult()) { ... }

Re: 'while <> {' in Perl 6

2002-08-09 Thread Trey Harris
In a message dated Fri, 9 Aug 2002, Adam Lopresto writes: > I was wondering whether the Perl 'while (<>){' idiom will continue to be > supported in Perl 6? I seem to recall people posting example code the list > using it (although I can't dig any up), but it seems to me that if Perl 6's > lazy l

'while <> {' in Perl 6

2002-08-09 Thread Adam Lopresto
I was wondering whether the Perl 'while (<>){' idiom will continue to be supported in Perl 6? I seem to recall people posting example code the list using it (although I can't dig any up), but it seems to me that if Perl 6's lazy list implementation is sufficiently smart, it could just be replaced