Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-19 Thread Lars Henrik Mathiesen
Date: Thu, 18 Apr 2002 23:44:26 +0200 From: Paul Johnson [EMAIL PROTECTED] On Thu, Apr 18, 2002 at 07:56:06PM -, Lars Henrik Mathiesen wrote: I would like to write for my $key ( $hash{foo}-keys ) { print $hash{bar}-{$key} } This, or something similar was hashed out on p5p,

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-19 Thread abigail
On Fri, Apr 19, 2002 at 01:35:10PM -, Lars Henrik Mathiesen wrote: Date: Thu, 18 Apr 2002 23:44:26 +0200 From: Paul Johnson [EMAIL PROTECTED] On Thu, Apr 18, 2002 at 07:56:06PM -, Lars Henrik Mathiesen wrote: I would like to write for my $key ( $hash{foo}-keys ) {

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-19 Thread Ton Hospel
In article [EMAIL PROTECTED], Bart Lateur [EMAIL PROTECTED] writes: On Thu, 18 Apr 2002 12:42:17 -0500, c. church wrote: $hash{foo}{bar}{baz} is extrmely descriptive. I like it. I can look in once place and see exactly what I need. Yeah... but what I don't like, is that if I have

Re: AW: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread Jonathan E. Paton
Braces with whitespace in front of them are now always closures. This adds a great deal of power and flexibility to the design. But if some people just are lamenting the loss of the whitespace in hash accesses because that's the standard that C set long ago, the, to quote Larry, The

Re: AW: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread David Wheeler
On 4/18/02 5:37 AM, Jonathan E. Paton [EMAIL PROTECTED] claimed: If I get it right, the main trouble here is that there are no sensible bracketing delimiters left on the keyboard... Not unless we perhaps starting getting into high Unicode territory... Scan keyboard... found one! How

Re: AW: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread Steffen Mueller
David Wheeler [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | while () { | # do stuff to $_ | } Don't you consider \\ to be outright beatiful? More like a piece of art than an operator... or more of a tie fighter? \FH\ Now, that's a tie fighter with

RE: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread Ala Qumsieh
c. church writes: If that's bad, just use something nearly as bad once, i.e.: my $hRef = \%{ $hash{foo}{bar} }; $hash{foo}{bar} is already a hashref. You don't need to dereference it just to reference it back: my $href = $hash{foo}{bar}; Having said that, I don't believe that

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread Lars Henrik Mathiesen
[EMAIL PROTECTED] (c. church) writes: - Original Message - From: [EMAIL PROTECTED] I agree. C$hash{foo}{bar}{baz} is horribly ugly. Your solution is a redesign. My solution is to use whitespace. The latter is far easier than the former. Personally, I disagree - $hash{foo}{bar}{baz}

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread Steffen Mueller
Lars Henrik Mathiesen [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [...] | What I've sometimes wished for is some way of dereffing to a hash or | array using - or some related postfix thing. So instead of | | my $aref = $hash{foo}; | for my $key (

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-18 Thread Paul Johnson
On Thu, Apr 18, 2002 at 07:56:06PM -, Lars Henrik Mathiesen wrote: What I've sometimes wished for is some way of dereffing to a hash or array using - or some related postfix thing. So instead of my $aref = $hash{foo}; for my $key ( keys %$aref ) { print $hash{bar}-{$key} } or

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread Abhijit Menon-Sen
At 2002-04-16 20:16:17, [EMAIL PROTECTED] wrote: And no, saying perl5 will still be around isn't doing us much good. There won't be new development of perl5, or bug fixes. There will. It'll just be slower than it is now. - ams

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread Jonathan E. Paton
And no, saying perl5 will still be around isn't doing us much good. There won't be new development of perl5, or bug fixes. Other languages will remain being developed and bugfixed. If perl6 is going to happen (I hope it won't), I'll be shopping for a new language. perl6 will just be

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread David Wheeler
On 4/17/02 9:11 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] claimed: I find it amazing that someone can make a statement like 99% of the time, people leave whitespace of the aggregate and the index, just based on personal experience. Based on the code *I* have written in the past 20 years,

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread Bill -Sx- Jones
On 4/16/02 5:06 PM, Ton Hospel [EMAIL PROTECTED] wrote: It's very well possible that I'll stubbornly keep using perl5 if perl6 comes out. Maybe my (mis)understanding from Larry is that Perl 6 will provide a jumping off platform into better language non-specific things that we may not see at

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread Jonathan E. Paton
It's very well possible that I'll stubbornly keep using perl5 if perl6 comes out. Maybe my (mis)understanding from Larry is that Perl 6 will provide a jumping off platform into better language non-specific things that we may not see at this time, but things that will become apparent

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread abigail
On Wed, Apr 17, 2002 at 10:23:42AM -0700, David Wheeler wrote: On 4/17/02 9:11 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] claimed: I find it amazing that someone can make a statement like 99% of the time, people leave whitespace of the aggregate and the index, just based on personal

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread David Wheeler
On 4/17/02 12:53 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] claimed: I think the gain is just the option of not having to write () in if. If () was still mandatory, there would be no ambiguity when a block is a hash index and when it cannot be - which means it has to be a closure. Well, that

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread Piers Cawley
[EMAIL PROTECTED] writes: On Wed, Apr 17, 2002 at 10:23:42AM -0700, David Wheeler wrote: On 4/17/02 9:11 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] claimed: I find it amazing that someone can make a statement like 99% of the time, people leave whitespace of the aggregate and the index,

AW: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-17 Thread Pense, Joachim
David Wheeler [mailto:[EMAIL PROTECTED]] wrote: Braces with whitespace in front of them are now always closures. This adds a great deal of power and flexibility to the design. But if some people just are lamenting the loss of the whitespace in hash accesses because that's the standard that C

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-16 Thread David Wheeler
On 4/16/02 7:43 AM, Griffith, Shaun [EMAIL PROTECTED] claimed: So I take it readability is deprecated? For instance: $some_nested_hash{very_long_descriptive_key}{another_key}...{last_key} can no longer be broken into multiple lines, like this?

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-16 Thread Stephen Turner
On Tue, 16 Apr 2002, David Wheeler wrote: So while you'll need to do this: %some_nested_hash{very_long_descriptive_key} {another_key} ... {last_key} = 'foo'; You'll have to do this for control blocks: if

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-16 Thread abigail
On Tue, Apr 16, 2002 at 09:03:14AM -0700, David Wheeler wrote: On 4/16/02 7:43 AM, Griffith, Shaun [EMAIL PROTECTED] claimed: So I take it readability is deprecated? For instance: $some_nested_hash{very_long_descriptive_key}{another_key}...{last_key} can no longer be

RE: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-16 Thread Ala Qumsieh
Stephen Turner writes: Am I the only person who gets more scared of Perl 6 the more he hears about it? No you're not. I'm sure many people, myself included, share the same mixed feelings towards Perl 6. I don't even feel comfortable calling it Perl anymore. Still waiting for the regexp

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-16 Thread Piers Cawley
Griffith, Shaun [EMAIL PROTECTED] writes: Abigail wrote: What am I missing? What you are missing is the new white space rule: \s+{ } shall be always be a block. Hence the difference between %hash {foo} and %hash{foo}. So I take it readability is deprecated? For instance:

Re: Whitespace and Blocks (was RE: Fisher-Yates shuffle)

2002-04-16 Thread Ton Hospel
In article Pine.LNX.3.96.1020416171808.1438C-10@gentoo, Stephen Turner [EMAIL PROTECTED] writes: Am I the only person who gets more scared of Perl 6 the more he hears about it? Nope. What I've heard about it 'till now I don't particularly like. It's very well possible that I'll