Re: Bracekets

2002-04-10 Thread Mark J. Reed
On Wed, Apr 10, 2002 at 04:03:29PM +1000, Damian Conway wrote: > My understanding was that perl6 would default to Perl 6 (*not* Perl 5), unless > the first thing it encountered was a: > > package Whatever; > > statement. If so, that's a change, at least from what I gleaned by following th

Re: Bracekets

2002-04-09 Thread Damian Conway
Simon Cozens wrote: > > Piers Cawley: > > Well, no. Because Perl 6 is specified as behaving like perl 5 until > > told different. Which means that the first translation you give would > > be a syntax error. > > Ouch. Guess I need to go reread A1. Anyway, that makes it easier - > then there needs

Re: Bracekets

2002-04-09 Thread Piers Cawley
Simon Cozens <[EMAIL PROTECTED]> writes: > Piers Cawley: >> Well, no. Because Perl 6 is specified as behaving like perl 5 until >> told different. Which means that the first translation you give would >> be a syntax error. > > Ouch. Guess I need to go reread A1. Anyway, that makes it easier - >

Re: Bracekets

2002-04-09 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Tue, Apr 09, 2002 at 04:17:38PM +0100, Simon Cozens wrote: >> Aaron Sherman: >> >nice du -a | sort -n | tail -300 | tac | perl -nle ' >> >die "Require non-zero disk size!\n" unless $ENV{DF}; >> >if ($. == 1) { >> >

Re: Bracekets

2002-04-09 Thread Simon Cozens
Aaron Sherman: > perl -MNet::Ping -nle 'print "Ghost DHCP lease: $1" > if /lease\s+(\d\S+)/ && > ! Net::Ping->new("icmp")->ping($1)' \ > /var/state/dhcp/dhcpd.leases This becomes perl -MNet::Ping -nle 'print "Ghost DHCP lease: $1" if /lease\s+(\d\S+)/ &&

Re: Bracekets

2002-04-09 Thread Luke Palmer
> If the new, spiffy features of Perl6 are out of my reach that 60-80% of > the time, and I have to use "perl5compat -nle ...", then the usefulness > of this new language will be largely lost on me. I'm not sure I follow. What hypothetical features are you talking about here? From what I've seen

Re: Bracekets

2002-04-09 Thread Aaron Sherman
On Mon, 2002-04-08 at 20:39, Larry Wall wrote: > Aaron Sherman writes: > : If {} goes away in Perl6, then everything you've heard about Perl6 being > : "not really all that different from Perl5" is either a lie or a damned > : lie. People keep saying "it's just Perl5, but instead of syntax X, you

Re: Bracekets

2002-04-08 Thread Luke Palmer
> As to the inspring issue about using [] for hashes, I say go for it if > (and only if) it is a signifigant improvement for the parser. I would imagine it's not. The braces are one of the things that make Perl "feel" like Perl. My original post that inspired this gigantic discussion was simp

Re: Bracekets

2002-04-08 Thread Erik Steven Harrison
> >$a is a hash key >$b is an array index >$c is another hash key > >So, if I try: > >@multi_dim[$b][$a][$c] > >then it's obviously going to break. But how can I, the >programmer, easily spot that? It's not as clear as: > >@multi_dim{$a}[$b]{$c} > >where I can see what I'm getting as I work thr

Re: Bracekets

2002-04-08 Thread Larry Wall
Aaron Sherman writes: : On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: : : > I'm I beating this point to death, or do I have to write : > the RPC: : > : > "Keep the {} and [] notation for hashes and arrays" : > : > or : > : > "Save our array!" : : Let's boil this RFC down to one short

Re: Bracekets

2002-04-08 Thread Nicholas Clark
On Mon, Apr 08, 2002 at 06:01:57PM +0100, Jonathan E. Paton wrote: > To make the symbols {} and [] aggregate you'd have to > default [] to using hashes - and force it back to > arrays using explicit syntax. You can't automagically > decide that it's never going to be used like a hash. > > I'm I

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 15:12, Piers Cawley wrote: > "Mark J. Reed" <[EMAIL PROTECTED]> writes: > > > On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: > >> > $_[_][EMAIL PROTECTED] _=_0_-_ > > $_.[_()] _ @_._() _= _0_() - _() [...] > > This is where my interpretation fails because t

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 15:09, Mark J. Reed wrote: > On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: > > > Also, just wondering: > > > > > > $_[_][EMAIL PROTECTED] _=_0_-_ > > > > > > does that work the way I expect it to? > > > > Dunno, what do you expect it to do?. To my way of th

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 14:56, Piers Cawley wrote: > Aaron Sherman <[EMAIL PROTECTED]> writes: > > Also, just wondering: > > > > $_[_][EMAIL PROTECTED] _=_0_-_ > > > > does that work the way I expect it to? > > Dunno, what do you expect it to do?. To my way of thinking there's > going to be a

Re: Bracekets

2002-04-08 Thread Piers Cawley
"Mark J. Reed" <[EMAIL PROTECTED]> writes: > On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: >> > Also, just wondering: >> > >> >$_[_][EMAIL PROTECTED] _=_0_-_ >> > >> > does that work the way I expect it to? >> >> Dunno, what do you expect it to do?. To my way of thinking ther

Re: Bracekets

2002-04-08 Thread Mark J. Reed
On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: > > Also, just wondering: > > > > $_[_][EMAIL PROTECTED] _=_0_-_ > > > > does that work the way I expect it to? > > Dunno, what do you expect it to do?. To my way of thinking there's > going to be a syntax error at the third '_'. B

Re: Bracekets

2002-04-08 Thread Jonathan Scott Duff
On Mon, Apr 08, 2002 at 02:50:55PM -0400, Aaron Sherman wrote: > Also, just wondering: > > $_[_][EMAIL PROTECTED] _=_0_-_ > > does that work the way I expect it to? Well, my internal Perl 6 parser hadn't been used all that much, but if you expect this to be a syntax error, then I think yo

Re: Bracekets

2002-04-08 Thread Jonathan E. Paton
> > I'm I beating this point to death, or do I have to write > > the RPC: > > > > "Keep the {} and [] notation for hashes and arrays" > > > > or > > > > "Save our array!" > > Let's boil this RFC down to one short phrase: > > If {} goes away in Perl6, then everything you've heard > about Perl6

Re: Bracekets

2002-04-08 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: > >> I'm I beating this point to death, or do I have to write >> the RPC: >> >> "Keep the {} and [] notation for hashes and arrays" >> >> or >> >> "Save our array!" > > Let's boil this RFC down to

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: > I'm I beating this point to death, or do I have to write > the RPC: > > "Keep the {} and [] notation for hashes and arrays" > > or > > "Save our array!" Let's boil this RFC down to one short phrase: If {} goes away in Perl6, then everyt

Re: Bracekets

2002-04-08 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 2:33 PM +0100 4/7/02, Piers Cawley wrote: >>"Jonathan E. Paton" <[EMAIL PROTECTED]> writes: >>> but wait, there's more... what does: >>> >>> @multi_dim[$a][$b][$c] >>> >>> give? >> >>Who cares? So long as the intermediate results in >>@multi_dim.[$

Re: Bracekets

2002-04-08 Thread Jonathan E. Paton
> >> but wait, there's more... what does: > >> > >> @multi_dim[$a][$b][$c] > >> > >> give? > > > >Who cares? So long as the intermediate results in > >@multi_dim.[$a].[$b].[$c] respond to []. > > Hrm. Will they need to? That could arguably pass a three > element key ($a,$b,$c) to @multi_dim w

Re: Bracekets

2002-04-08 Thread Dan Sugalski
At 2:33 PM +0100 4/7/02, Piers Cawley wrote: >"Jonathan E. Paton" <[EMAIL PROTECTED]> writes: >> but wait, there's more... what does: >> >> @multi_dim[$a][$b][$c] >> >> give? > >Who cares? So long as the intermediate results in >@multi_dim.[$a].[$b].[$c] respond to []. Hrm. Will they need to?

Re: Bracekets

2002-04-07 Thread Piers Cawley
"Jonathan E. Paton" <[EMAIL PROTECTED]> writes: > but wait, there's more... what does: > > @multi_dim[$a][$b][$c] > > give? Who cares? So long as the intermediate results in @multi_dim.[$a].[$b].[$c] respond to []. -- Piers "It is a truth universally acknowledged that a language in poss

Re: Bracekets

2002-04-07 Thread Jonathan E. Paton
> > but wait, there's more... what does: > > > > @multi_dim[$a][$b][$c] > > > > give? > > It's representation hiding. I can change my layout from hashes to arrays > without the clients of my code having to know. :) > > Seriously, the above argument might actually hold some merit when changing >

Re: Bracekets

2002-04-07 Thread Michel J Lambert
> but wait, there's more... what does: > > @multi_dim[$a][$b][$c] > > give? It's representation hiding. I can change my layout from hashes to arrays without the clients of my code having to know. :) Seriously, the above argument might actually hold some merit when changing a matrix to a sparse m

Re: Bracekets

2002-04-07 Thread Jonathan E. Paton
> I know this is going pretty far back in the design process, but I was > wondering why we're using curlies for hash subscripts, now that the % > sticks around when you key it. Then curlies could only two > things : Anonymous hash making and closure making. Maybe it's just too > much culture s

Bracekets

2002-04-07 Thread Luke Palmer
I know this is going pretty far back in the design process, but I was wondering why we're using curlies for hash subscripts, now that the % sticks around when you key it. Then curlies could only two things : Anonymous hash making and closure making. Maybe it's just too much culture shock? I'v