Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-23 Thread arcadi shehter
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-23 Thread Michael Lazzaro
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Dave Whipp
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread David Storrs
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.

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Dave Whipp
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Michael Lazzaro
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,

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Luke Palmer
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Kwindla Hultman Kramer
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,

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Austin Hastings
--- 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.

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-22 Thread Thomas A. Boyer
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)

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-21 Thread Michael Lazzaro
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-21 Thread Smylers
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-21 Thread Michael Lazzaro
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

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-21 Thread Buddha Buck
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,

Re: Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-21 Thread Michael Lazzaro
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

Why Cmap needs work (was Re: L2R/R2L syntax)

2003-01-20 Thread Michael Lazzaro
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