Re: perl 6 grammar

2007-12-07 Thread Larry Wall
On Fri, Dec 07, 2007 at 02:47:05AM +0100, Juerd Waalboer wrote: : Jonathan Lang skribis 2007-12-06 16:36 (-0800): : > > I know it used to be that way back near the Dawn of Time, but methods : > > don't automatically topicalize anymore unless you explicitly name : > > one of the parameters '$_': : >

Re: perl 6 grammar

2007-12-07 Thread Larry Wall
On Thu, Dec 06, 2007 at 04:36:26PM -0800, Jonathan Lang wrote: : Larry Wall wrote: : > On Tue, Dec 04, 2007 at 08:40:10AM -0800, Jonathan Lang wrote: : > : or (I think): : > : : > : method test ($value) { : > : setup(); : > : when $value { doit() } #[smart-match the calling object $_ agai

Re: perl 6 grammar

2007-12-06 Thread Juerd Waalboer
Jonathan Lang skribis 2007-12-06 16:36 (-0800): > > I know it used to be that way back near the Dawn of Time, but methods > > don't automatically topicalize anymore unless you explicitly name > > one of the parameters '$_': > Huh. I guess I need to review current standards for method > declaration

Re: perl 6 grammar

2007-12-06 Thread Jonathan Lang
Larry Wall wrote: > On Tue, Dec 04, 2007 at 08:40:10AM -0800, Jonathan Lang wrote: > : or (I think): > : > : method test ($value) { > : setup(); > : when $value { doit() } #[smart-match the calling object $_ against > $value.] > : } > > I know it used to be that way back near the Dawn

Re: perl 6 grammar

2007-12-06 Thread Larry Wall
On Tue, Dec 04, 2007 at 08:40:10AM -0800, Jonathan Lang wrote: : or (I think): : : method test ($value) { : setup(); : when $value { doit() } #[smart-match the calling object $_ against $value.] : } I know it used to be that way back near the Dawn of Time, but methods don't automatic

Re: ***SPAM*** Re: perl 6 grammar

2007-12-05 Thread cdumont
Miroslav Silovic wrote: >cdumont wrote: > > >>In japanese it could even be : >> >>wa { >> '' no baai ni { ... } >>} >> >>Getting rid off the thema or I guess here taking $_ as the default. >> >>is this possible : >> >>given $operator { >>'' {} >>'' {} >>} >> >>? >> >> >>

Re: perl 6 grammar

2007-12-05 Thread cdumont
Jonathan Lang wrote: Another thing to note about given ... when: you don't have to use them together. All that "given" does is to set $_ to the variable provided; this can be used in a manner similar to "with" statements in other languages. And "when" doesn't have to be inside a "given" block,

Re: perl 6 grammar

2007-12-04 Thread Jonathan Lang
Another thing to note about given ... when: you don't have to use them together. All that "given" does is to set $_ to the variable provided; this can be used in a manner similar to "with" statements in other languages. And "when" doesn't have to be inside a "given" block, either: it can be used

Re: ***SPAM*** Re: perl 6 grammar

2007-12-04 Thread Miroslav Silovic
cdumont wrote: > In japanese it could even be : > > wa { > '' no baai ni { ... } > } > > Getting rid off the thema or I guess here taking $_ as the default. > > is this possible : > > given $operator { > '' {} > '' {} > } > > ? > > If Larry doesn't mind me elbowing into th

Re: perl 6 grammar

2007-12-03 Thread cdumont
Larry Wall wrote: >On Mon, Dec 03, 2007 at 07:30:53PM +0900, cdumont wrote: > > >>Moritz Lenz wrote: >> >> >> >>>cdumont wrote: >>> >>> >>> 1- $str1 ~ $str2 >>>The '+' suggests numerical addition (and requires disambiguation in the >>>case of $str + $numb

Re: perl 6 grammar

2007-12-03 Thread cdumont
Patrick R. Michaud wrote: On Mon, Dec 03, 2007 at 12:20:02PM +, Smylers wrote: cdumont writes: I don't really think using the column in a ternary means that you cannot use it else where. We started off with that, and it was changed specifically because it was causing a prob

Re: perl 6 grammar

2007-12-03 Thread cdumont
Smylers wrote: cdumont writes: Smylers wrote: cdumont writes: The given ... when doesn't seem to bring that much from switch ... case given ... Surely it brings all of it? Plus much more as well. Much of the power is in the smart-matching, which enables many diff

Re: perl 6 grammar

2007-12-03 Thread Larry Wall
On Mon, Dec 03, 2007 at 07:30:53PM +0900, cdumont wrote: > Moritz Lenz wrote: > >> cdumont wrote: >> >>> 1- $str1 ~ $str2 >>> >> >> The '+' suggests numerical addition (and requires disambiguation in the >> case of $str + $number - should $str be interpreted as a number, or >> $number as a st

Re: perl 6 grammar

2007-12-03 Thread Patrick R. Michaud
On Mon, Dec 03, 2007 at 12:20:02PM +, Smylers wrote: > cdumont writes: > > I don't really think using the column in a ternary means that you > > cannot use it else where. > > We started off with that, and it was changed specifically because it was > causing a problem; I can't remember exactly

Re: perl 6 grammar

2007-12-03 Thread Smylers
cdumont writes: > Smylers wrote: > > > cdumont writes: > > > > The given ... when doesn't seem to bring that much from switch ... > > > case given ... > > > > Surely it brings all of it? Plus much more as well. Much of the > > power is in the smart-matching, which enables many different sort

Re: perl 6 grammar

2007-12-03 Thread cdumont
Smylers wrote: cdumont writes: there are some changes in the grammar which benefits aren't that obvious : Hi there. For some of these the benefit is indirect: it isn't that it makes the feature in question easier to use; instead it enables _other_ features. 1- $str1 ~ $str2 I d

Re: perl 6 grammar

2007-12-03 Thread Smylers
cdumont writes: > there are some changes in the grammar which benefits aren't that > obvious : Hi there. For some of these the benefit is indirect: it isn't that it makes the feature in question easier to use; instead it enables _other_ features. > 1- $str1 ~ $str2 > I do not really understand

Re: perl 6 grammar

2007-12-03 Thread cdumont
Moritz Lenz wrote: cdumont wrote: 1- $str1 ~ $str2 The '+' suggests numerical addition (and requires disambiguation in the case of $str + $number - should $str be interpreted as a number, or $number as a string?). The . is already taken by method calls (used far more often), and is e

Re: Perl 6 grammar progress?

2002-07-01 Thread Ashley Winters
On Monday 01 July 2002 02:30 pm, Uri Guttman wrote: > > "AW" == Ashley Winters <[EMAIL PROTECTED]> writes: > > AW> Also, where does $() come in? Is statement scalarification ever > AW> useful outside a string? > > it is the same as scalar() in perl5. it provides scalar context if used > ou

Re: Perl 6 grammar progress?

2002-07-01 Thread Uri Guttman
> "AW" == Ashley Winters <[EMAIL PROTECTED]> writes: AW> Also, where does $() come in? Is statement scalarification ever AW> useful outside a string? it is the same as scalar() in perl5. it provides scalar context if used outside a string. uri -- Uri Guttman -- [EMAIL PROTECTED]

Re: Perl 6 grammar progress?

2002-07-01 Thread Ashley Winters
On Sunday 30 June 2002 09:09 pm, Sean O'Rourke wrote: > On Sun, 30 Jun 2002, Ashley Winters wrote: > > I don't know how the grammars are going, and I'm not fit to write one > > myself, > > Hey, neither am I, but that hasn't stopped me from taking a stab or two, > figuring that through pain comes f

Re: Perl 6 grammar progress?

2002-07-01 Thread Erik Steven Harrison
-- On Sun, 30 Jun 2002 21:09:40 Sean O'Rourke wrote: >On Sun, 30 Jun 2002, Ashley Winters wrote: > >> I don't know how the grammars are going, and I'm not fit to write one >> myself, > >Hey, neither am I, but that hasn't stopped me from taking a stab or two, >figuring that through pain comes

Re: Perl 6 grammar progress?

2002-06-30 Thread Sean O'Rourke
On Sun, 30 Jun 2002, Ashley Winters wrote: > I don't know how the grammars are going, and I'm not fit to write one > myself, Hey, neither am I, but that hasn't stopped me from taking a stab or two, figuring that through pain comes fitness. The attempt has certainly given me a much better unders