Re: Switch/Given and English, Was perl 6 grammar

2007-12-10 Thread Richard Hainsworth
I've never said that switch ... case was better than given ... when or that switch ... case was even a good construct. I have said that given ... when sounds weird as a construct (not mentionning the use of past participle and on top of that of an irregular verb). I understand the meaning and

Re: Switch/Given and English, Was perl 6 grammar

2007-12-09 Thread Mark J. Reed
I think the idea is that if your programming language keywords are all English anyway, you might as well have them make sense *as* English. That makes it easier for English-speakers to learn, without making it harder for non-English speakers - except for the fact that it's different from other prog

Re: Switch/Given and English, Was perl 6 grammar

2007-12-09 Thread cdumont
Richard Hainsworth wrote: I don't know why, this given... when sounds so 'English' without really being that English. The construct sounds better in English than ... case ...> because: a) Switch is more commonly used in English as a noun, eg., Use the switch to turn on the light. But beca

Re: Switch/Given and English, Was perl 6 grammar

2007-12-08 Thread Brandon S. Allbery KF8NH
On Dec 8, 2007, at 9:06 , Richard Hainsworth wrote: or not quite right. And there is absolutely no linguistic link between 'switch' and 'case'. If I am uncomfortable with 'switch', 'case' really sucks. In fact, whenever I work in language other than perl, and 'switch' is the preferred cons

Switch/Given and English, Was perl 6 grammar

2007-12-08 Thread Richard Hainsworth
I don't know why, this given... when sounds so 'English' without really being that English. The construct sounds better in English than case ...> because: a) Switch is more commonly used in English as a noun, eg., Use the switch to turn on the light. But because English can use nouns for ver

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

perl 6 grammar

2007-12-03 Thread cdumont
I found some of the perl 6 new features really neat: - creating your own type - type casting - junctions - multidispatch - :r:w:a shortcuts - hyper operators - some kind of oop keywords But there are some changes in the grammar which benefits aren't that obvious : 1- $str1 ~ $str2 2- $life = (!

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-07-01 Thread John Porter
For some reason I feel really, really bad saying this -- in fact, I'm warming up the flog right now -- but, um, maybe Damian should write it? __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com

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

Re: Perl 6 grammar progress?

2002-06-30 Thread Ashley Winters
On Sunday 30 June 2002 12:46 pm, Dan Sugalski wrote: > So, it's been a week or so and, while I'm mostly offline until > wednesday, I'll ask the question... > > How's the work on the perl 6 grammar going? We any further along than > we were before YAPC? I do

Perl 6 grammar progress?

2002-06-30 Thread Dan Sugalski
So, it's been a week or so and, while I'm mostly offline until wednesday, I'll ask the question... How's the work on the perl 6 grammar going? We any further along than we were before YAPC? -- Dan -