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

2007-12-10 Thread Richard Hainsworth
snip 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

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

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

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

Switch/Given and English, Was perl 6 grammar

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

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

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 '$_': : Huh.

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

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: ***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 the conversation...

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 in any

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

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

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 the

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

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 sorts of

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 what,

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 string?). The . is

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

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

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 + $number - should $str be interpreted as a number,

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 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 outside a string.

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 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 fitness.

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