Thomas A. Boyer writes:
Michael Lazzaro wrote:
*Now*, what to do about the fantastic magic that pointy-sub provides?
The _spectacular_ win would be if we could just recognize an optional
parameter list as part of a block.
map @a : ($a,$b) {...} # params + closure = closure
On Wednesday, January 22, 2003, at 11:42 AM, Kwindla Hultman Kramer
wrote:
Michael Lazzaro writes:
And it provides a very visual way to define any pipe-like algorithm,
in
either direction:
$in - lex - parse - codify - optimize - $out; # L2R
$out - optimize - codify - parse - lex
Michael Lazzaro [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Of course, _I'd_ even prefer using - and - as the 'piping' operators,
and having ~ or | for pointy sub, because then $a-foo and $a.foo
really _could_ be the same thing, 'cept for precedence. But
On Tue, Jan 21, 2003 at 03:52:30PM -0800, Dave Whipp wrote:
$a = sub ($a, $b) { ... }
$x = - ($y, $z) { ... }
The pointy-arrow doesn't buy anything here.
IMHO, it's actually a loss. I have yet to come up with any mnemonic
for pointy arrow means sub that will actually stick in my brain.
David Storrs [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
And then we can replace the ~ with -:
for 1,2,3,4
- sub ($a, $b) { $a+$b }
- sub ($a) { $a**2 }
- { $^foo - 1 }
- print;
And this begs the question: what exactly does
On Tuesday, January 21, 2003, at 03:52 PM, Dave Whipp wrote:
But in a for loop:
for 1,2,3,4 { ... }
for 1,2,3,4 - ($a,$b) {...}
its cuteness works because the brain sees it as a piping operator (even
though its not).
That's an excellent observation. I like the 'for' syntax quite a bit,
Date: Wed, 22 Jan 2003 10:38:23 -0800
From: Michael Lazzaro [EMAIL PROTECTED]
On Tuesday, January 21, 2003, at 03:52 PM, Dave Whipp wrote:
But in a for loop:
for 1,2,3,4 { ... }
for 1,2,3,4 - ($a,$b) {...}
its cuteness works because the brain sees it as a piping operator (even
Michael Lazzaro writes:
And it provides a very visual way to define any pipe-like algorithm, in
either direction:
$in - lex - parse - codify - optimize - $out; # L2R
$out - optimize - codify - parse - lex - $in; # R2L
It's clear, from looking at either of those,
--- Luke Palmer [EMAIL PROTECTED] wrote:
[[... Massive elision ...]]
I'm thinking it would be a very good idea to unify Cfor and Cmap
in their argument style. I still think the distinction between
Cfor's void and Cmap's list context is a good one; i.e. don't
make them Ientire synonyms.
Michael Lazzaro wrote:
*Now*, what to do about the fantastic magic that pointy-sub provides?
The _spectacular_ win would be if we could just recognize an optional
parameter list as part of a block.
map @a : ($a,$b) {...} # params + closure = closure with params?
for @a : ($a,$b)
On Monday, January 20, 2003, at 04:33 PM, Michael Lazzaro wrote:
But both the OO and pipeline syntaxes do more to point out the noun,
verb, and adjective of the operation.
Adverb. The {...} part is an adverb, not an adjective. Sorry there.
MikeL
Michael Lazzaro wrote:
On Monday, January 20, 2003, at 12:30 PM, Smylers wrote:
It was only on reading that (and discovering that you hadn't
previously known about the 'optional comma with closure argument'
rule) that I understood why you had previously been so in favour of
proposed
On Tuesday, January 21, 2003, at 01:31 PM, Smylers wrote:
Michael Lazzaro wrote:
it's that I _dislike_ the perl5 rule, ...
Oh. That's dislike rather than disliked? My question was
predicated on your declaration I emphatically withdraw my objection,
which I took to mean that your knowledge
Smylers wrote:
Michael Lazzaro wrote:
And it provides a very visual way to define any pipe-like algorithm, in
either direction:
$in - lex - parse - codify - optimize - $out; # L2R
$out - optimize - codify - parse - lex - $in; # R2L
It's clear, from looking at either of those,
On Tuesday, January 21, 2003, at 02:38 PM, Buddha Buck wrote:
Michael Lazzaro wrote:
And it provides a very visual way to define any pipe-like algorithm,
in either direction:
$in - lex - parse - codify - optimize - $out; # L2R
$out - optimize - codify - parse - lex - $in; # R2L
On Monday, January 20, 2003, at 12:30 PM, Smylers wrote:
Ah. It was only on reading that (and discovering that you hadn't
previously known about the 'optional comma with closure argument' rule)
that I understood why you had previously been so in favour of proposed
new syntaxes: through a desire
16 matches
Mail list logo