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
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
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
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
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
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.
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
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,
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...
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
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 =
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
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
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
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
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,
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
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
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
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,
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 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.
--
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 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.
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
25 matches
Mail list logo