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
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
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
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
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
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 '$_':
: >
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
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
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
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
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 {
>>'' {}
>>'' {}
>>}
>>
>>?
>>
>>
>>
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,
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
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
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
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
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
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
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
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
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
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
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
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 = (!
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
> "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]
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
--
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
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
29 matches
Mail list logo