Re: L2R/R2L syntax

2003-01-27 Thread martin
On Sat, 25 Jan 2003, Damian Conway wrote: As far as I know Larry is not planning to remove the functional forms of Cmap, Cgrep, etc. Those forms may, it's true, become mere wrappers for the OO forms. But I confidently expect they will still be available. Hmmm, so that means that they should

Re: L2R/R2L syntax

2003-01-25 Thread Damian Conway
Michael Lazzaro wrote: When I come home from work each day, I can see my dog eagerly waiting at the window, just black snout and frenetically wagging tail visible over the sill. I often think Larry and Damian must feel that way about this group. Poor, comical beasts, but so eager and

Re: TPF donations (was Re: L2R/R2L syntax [x-adr][x-bayes])

2003-01-25 Thread Damian Conway
David Storrs wrote: Correct me if I'm wrong, but isn't the one thing that all those projects have in common...well...Perl? And isn't Larry the guy to whom we owe the existence of Perl? I'm not fortunate enough to be using Perl in my job, but I'm still more than happy to pony up for a donation,

Re: L2R/R2L syntax

2003-01-25 Thread Damian Conway
Graham Barr wrote: This is not a for or against, but there is something that has been bugging me about this. Currently in Perl5 it is possible to create a sub that has map/grep-like syntax, take a look at List::Util If the function form of map/grep were to be removed, which has been suggested,

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: L2R/R2L syntax

2003-01-22 Thread arcadi shehter
Damian Conway writes: Not equivalent at all. C$foo~bar means append $foo to the argument list of subroutine Cbar. Cfoo.bar means make C$foo the invocant for method bar. Curiously enough, the confusions I'm hearing over this issue are, to me, the strongest argument yet for using

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 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: L2R/R2L syntax

2003-01-21 Thread Michael Lazzaro
On Tuesday, January 21, 2003, at 02:04 AM, Graham Barr wrote: If the function form of map/grep were to be removed, which has been suggested, and the ~ form maps to methods. How would you go about defining a utility module similar to List::Util that uses the same syntax as map/grep but without

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: L2R/R2L syntax

2003-01-21 Thread Piers Cawley
Graham Barr [EMAIL PROTECTED] writes: On Mon, Jan 20, 2003 at 07:27:56PM -0700, Luke Palmer wrote: What benefit does C ~ bring to the language? Again, it provides not just a null operator between to calls, but rather a rewrite of method call syntax. So: map {...} ~ grep {...} ~

Re: L2R/R2L syntax

2003-01-21 Thread Michael Lazzaro
On Tuesday, January 21, 2003, at 12:26 PM, Piers Cawley wrote: Though I'm sure Damian will be long eventually to correct my syntax. I'm getting this weird feeling of deja vu though... When I come home from work each day, I can see my dog eagerly waiting at the window, just black snout and

Re: L2R/R2L syntax

2003-01-21 Thread Piers Cawley
Michael Lazzaro [EMAIL PROTECTED] writes: On Tuesday, January 21, 2003, at 12:26 PM, Piers Cawley wrote: Though I'm sure Damian will be long eventually to correct my syntax. I'm getting this weird feeling of deja vu though... When I come home from work each day, I can see my dog eagerly

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: TPF donations (was Re: L2R/R2L syntax [x-adr][x-bayes])

2003-01-21 Thread Austin Hastings
--- David Storrs [EMAIL PROTECTED] wrote: On Fri, Jan 17, 2003 at 04:21:08PM -0800, Damian Conway wrote: Paul Johnson wrote: Well, I'll be pretty interested to discover what cause is deemed more deserving than Larry, Perl 6 or Parrot. The P still stands for Perl, right?

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

Re: TPF donations (was Re: L2R/R2L syntax [x-adr][x-bayes])

2003-01-21 Thread Nicholas Clark
On Tue, Jan 21, 2003 at 02:21:58PM -0800, Austin Hastings wrote: --- David Storrs [EMAIL PROTECTED] wrote: This is something along the lines of the applied research vs basic research question. What Larry is doing pretty much amounts to basic research that will help all of these other

Re: L2R/R2L syntax

2003-01-20 Thread Austin Hastings
--- Luke Palmer [EMAIL PROTECTED] wrote: Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Date: Sat, 18 Jan 2003 15:07:56 -0800 (PST) From: Sean O'Rourke [EMAIL PROTECTED] Cc: Damian Conway [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] X-SMTPD: qpsmtpd/0.20,

Re: L2R/R2L syntax

2003-01-20 Thread Luke Palmer
Date: Mon, 20 Jan 2003 09:20:45 -0800 (PST) From: Austin Hastings [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] --- Luke Palmer [EMAIL PROTECTED] wrote: Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Date: Sat, 18 Jan 2003 15:07:56 -0800 (PST) From:

Re: L2R/R2L syntax

2003-01-20 Thread Michael Lazzaro
On Sunday, January 19, 2003, at 09:51 PM, Luke Palmer wrote: From: Sean O'Rourke [EMAIL PROTECTED] On Sat, 18 Jan 2003, Michael Lazzaro wrote: So 'if' and friends are just (native) subroutines with prototypes like: IIRC it's not that pretty, unfortunately, if you want to support this: That

Re: L2R/R2L syntax

2003-01-20 Thread Michael Lazzaro
On Monday, January 20, 2003, at 09:37 AM, Luke Palmer wrote: Is this magic, or do coderef args construct closures, or what? How do you avoid evaluating the argument to elsunless() when feeding it to the if() sub? Oops. Good point. In this case I see no way of doing it except for specifying

Re: L2R/R2L syntax

2003-01-20 Thread Buddha Buck
Michael Lazzaro wrote: On Sunday, January 19, 2003, at 09:51 PM, Luke Palmer wrote: From: Sean O'Rourke [EMAIL PROTECTED] On Sat, 18 Jan 2003, Michael Lazzaro wrote: So 'if' and friends are just (native) subroutines with prototypes like: IIRC it's not that pretty, unfortunately, if you

Re: L2R/R2L syntax

2003-01-20 Thread Austin Hastings
--- Michael Lazzaro [EMAIL PROTECTED] wrote: On Sunday, January 19, 2003, at 09:51 PM, Luke Palmer wrote: From: Sean O'Rourke [EMAIL PROTECTED] On Sat, 18 Jan 2003, Michael Lazzaro wrote: So 'if' and friends are just (native) subroutines with prototypes like: IIRC it's not that

Re: L2R/R2L syntax

2003-01-20 Thread Smylers
Michael Lazzaro wrote: Damian Conway wrote: you can leave a comma out either side of a block/closure, no matter where it appears in the argument list Hmm. I had been figuring the all conditional/loop stuff would be special cases within the grammar, because of their associated cruft...

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

Re: L2R/R2L syntax

2003-01-20 Thread Luke Palmer
Date: 20 Jan 2003 20:30:07 - From: Smylers [EMAIL PROTECTED] It seems that when chaining together functions, omitting C ~ operators gives the same result in the familiar Perl 5 standard function-call syntax: @foo = sort { ... } ~ map { ... } ~ grep { ... } ~ @bar; @foo = sort {

Re: L2R/R2L syntax

2003-01-19 Thread Sean O'Rourke
On Sat, 18 Jan 2003, Michael Lazzaro wrote: So 'if' and friends are just (native) subroutines with prototypes like: sub if (bool $c, Code $if_block) {...}; IIRC it's not that pretty, unfortunately, if you want to support this: if $test1 { # blah } elsunless $test2 {

Re: L2R/R2L syntax

2003-01-19 Thread Mr. Nobody
--- Sean O'Rourke [EMAIL PROTECTED] wrote: On Sat, 18 Jan 2003, Michael Lazzaro wrote: So 'if' and friends are just (native) subroutines with prototypes like: sub if (bool $c, Code $if_block) {...}; IIRC it's not that pretty, unfortunately, if you want to support this: if

Re: L2R/R2L syntax

2003-01-19 Thread Luke Palmer
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Date: Sat, 18 Jan 2003 15:07:56 -0800 (PST) From: Sean O'Rourke [EMAIL PROTECTED] Cc: Damian Conway [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/ On Sat, 18 Jan

Re: L2R/R2L syntax

2003-01-18 Thread Piers Cawley
Brent Dax [EMAIL PROTECTED] writes: Mr. Nobody: # I have to wonder how many people actually like this syntax, # and how many only say they do because it's Damian Conway who # proposed it. And map/grep aren't specialized syntax, you IIRC Damian also supports Unicode operators (and may

Re: L2R/R2L syntax

2003-01-18 Thread Dave Whipp
Michael Lazzaro [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... And note that as pretty as - is, we couldn't have - for piping because it would conflict rather strongly things like if ($a-5)# (negative five, or pipelike?) Its resolved by the longest

Re: Civility, please. (was Re: L2R/R2L syntax)

2003-01-18 Thread Sam Vilain
On Sat, 18 Jan 2003 15:10, you wrote: [EMAIL PROTECTED] (Michael Lazzaro) writes: I don't think any aspect of this discussion is hinged on people being 'ignorant' of perl5 behaviors, Oh, I do, and you've dismissed that argument out of hand. This isn't name-calling; this is a plea for Perl

Re: L2R/R2L syntax

2003-01-18 Thread Piers Cawley
Damian Conway [EMAIL PROTECTED] writes: Brent Dax asked: So @a ~ grep { ... } ~ @b Is the same as @b = grep { ... } @a Yes. As in... class Array { ... method grep (Array $ary: Code $code) returns Array { ...

Re: L2R/R2L syntax

2003-01-18 Thread Piers Cawley
Mr. Nobody [EMAIL PROTECTED] writes: --- Michael Lazzaro [EMAIL PROTECTED] wrote: On Friday, January 17, 2003, at 11:00 AM, Simon Cozens wrote: [EMAIL PROTECTED] (Michael Lazzaro) writes: ...the absence of the commas is what's special. If they were normal

Re: L2R/R2L syntax

2003-01-18 Thread Damian Conway
Dave Whipp wrote: And note that as pretty as - is, we couldn't have - for piping because it would conflict rather strongly things like if ($a-5)# (negative five, or pipelike?) Its resolved by the longest token rule, but it would be a common bug. So it would be a potential problem.

Re: L2R/R2L syntax

2003-01-18 Thread Damian Conway
Piers Cawley wrote: Multimethods don't belong to classes; they mediate interactions *between* classes. Will the 'is multi' actually be necessary? Just curious. That's still being discussed. *Something* is necessary. But it may be that, instead of: sub handle (Window $w, Event $e, Mode $m)

Re: L2R/R2L syntax

2003-01-18 Thread Piers Cawley
Damian Conway [EMAIL PROTECTED] writes: Piers Cawley wrote: Multimethods don't belong to classes; they mediate interactions *between* classes. Will the 'is multi' actually be necessary? Just curious. That's still being discussed. *Something* is necessary. But it may be that, instead of:

Re: L2R/R2L syntax

2003-01-18 Thread Damian Conway
Piers Cawley wrote: I really don't like that fine grained syntax I'm afraid. And I'm not entirely sure you actually gain anything from it do you? That's one of the questions we're still pondering. But see below. I also find myself wondering if functions called with: $foo.bar($baz)

Re: L2R/R2L syntax

2003-01-18 Thread Michael Lazzaro
Damian Conway wrote: If the rule was, you can leave a comma out either side of a block/closure, no matter where it appears in the argument list, it would also be more consistent. And that's what's being contemplated. Because otherwise, you also have to have: for @list, {...}

Re: L2R/R2L syntax

2003-01-18 Thread Michael Lazzaro
Damian Conway wrote: Piers Cawley wrote: I really don't like that fine grained syntax I'm afraid. And I'm not entirely sure you actually gain anything from it do you? That's one of the questions we're still pondering. Suppose I wanted to do something like: sub draw_triangle( Point

Re: L2R/R2L syntax

2003-01-18 Thread Damian Conway
Michael Lazzaro wrote: Suppose I wanted to do something like: sub draw_triangle( Point $a, Point $b, Point $c ); -and- sub draw_triangle( int $x1,$y1, int $x2,$y2, int $x3,$y3 ); Err. Why would you only want the X parameters to be explicitly typed? I suspect you mean: sub

Re: L2R/R2L syntax

2003-01-18 Thread Richard J Cox
On Friday, January 17, 2003, 6:35:47 PM, you (mailto:[EMAIL PROTECTED]) wrote: On Fri, Jan 17, 2003 at 06:21:43PM +, Simon Cozens wrote: [EMAIL PROTECTED] (Mr. Nobody) writes: I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian

Re: Civility, please. (was Re: L2R/R2L syntax)

2003-01-18 Thread Joseph F. Ryan
Sam Vilain wrote: On Sat, 18 Jan 2003 15:10, you wrote: [EMAIL PROTECTED] (Michael Lazzaro) writes: I don't think any aspect of this discussion is hinged on people being 'ignorant' of perl5 behaviors, Oh, I do, and you've dismissed that argument out of hand. This isn't

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread David Storrs
On Thu, Jan 16, 2003 at 04:14:20PM -0600, Jonathan Scott Duff wrote: On Thu, Jan 16, 2003 at 10:07:13PM +, Nicholas Clark wrote: The headers I received make no mention of character set - does your mailer mark the message in any way? If not, then STMP will assume it's good old 7 bit

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread Dan Sugalski
At 7:13 AM -0800 1/17/03, David Storrs wrote: Do we at least all agree that it would be a good thing if Unicode were the default character set for everything, everywhere? That is, editors, xterms, keyboards, etc? No. No, we don't. -- Dan

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread David Storrs
On Fri, Jan 17, 2003 at 10:59:57AM -0500, Dan Sugalski wrote: At 7:13 AM -0800 1/17/03, David Storrs wrote: Do we at least all agree that it would be a good thing if Unicode were the default character set for everything, everywhere? That is, editors, xterms, keyboards, etc? No. No, we

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread Austin Hastings
--- David Storrs [EMAIL PROTECTED] wrote: On Thu, Jan 16, 2003 at 04:14:20PM -0600, Jonathan Scott Duff wrote: On Thu, Jan 16, 2003 at 10:07:13PM +, Nicholas Clark wrote: The headers I received make no mention of character set - does your mailer mark the message in any way? If not,

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread Petras
* David Storrs [EMAIL PROTECTED] [2003-01-17 19:29:25]: On Fri, Jan 17, 2003 at 10:59:57AM -0500, Dan Sugalski wrote: At 7:13 AM -0800 1/17/03, David Storrs wrote: Do we at least all agree that it would be a good thing if Unicode were the default character set for everything, everywhere?

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread Dan Sugalski
At 8:08 AM -0800 1/17/03, David Storrs wrote: On Fri, Jan 17, 2003 at 10:59:57AM -0500, Dan Sugalski wrote: At 7:13 AM -0800 1/17/03, David Storrs wrote: Do we at least all agree that it would be a good thing if Unicode were the default character set for everything, everywhere? That is,

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-17 Thread David Storrs
On Fri, Jan 17, 2003 at 12:19:01PM -0500, Dan Sugalski wrote: At 8:08 AM -0800 1/17/03, David Storrs wrote: On Fri, Jan 17, 2003 at 10:59:57AM -0500, Dan Sugalski wrote: At 7:13 AM -0800 1/17/03, David Storrs wrote: Do we at least all agree that it would be a good thing if Unicode were

Re: L2R/R2L syntax

2003-01-17 Thread Michael Lazzaro
So, to bring this thread back on track *again*, I hopefully offer this summary. 1) Damian's idea of using ~ and ~ as L2R and R2L is well-liked. Thus: @out = grep { ... } map { ... } @in; # (1) (perl5) becomes any of the following: @out = grep { ... } ~ map { ... }

Re: L2R/R2L syntax

2003-01-17 Thread Mr. Nobody
--- Michael Lazzaro [EMAIL PROTECTED] wrote: So, to bring this thread back on track *again*, I hopefully offer this summary. 1) Damian's idea of using ~ and ~ as L2R and R2L is well-liked. Thus: @out = grep { ... } map { ... } @in; # (1) (perl5) becomes any of

RE: L2R/R2L syntax

2003-01-17 Thread Brent Dax
Mr. Nobody: # I have to wonder how many people actually like this syntax, # and how many only say they do because it's Damian Conway who # proposed it. And map/grep aren't specialized syntax, you IIRC Damian also supports Unicode operators (and may have originated the idea), and obviously many

Re: L2R/R2L syntax

2003-01-17 Thread Simon Cozens
[EMAIL PROTECTED] (Mr. Nobody) writes: I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. And map/grep aren't specialized syntax, you could do the same thing with a sub with a prototype of (block, *@list).

Re: L2R/R2L syntax

2003-01-17 Thread Simon Cozens
[EMAIL PROTECTED] (Brent Dax) writes: # could do the same thing with a sub with a prototype of # (block, *@list). Great. That could mean it won't work right for MyCustomArrayLikeThing. Can you explain what you mean by this, because it's not apparent to me that your statement is in any way

Re: L2R/R2L syntax

2003-01-17 Thread Paul Johnson
Mr. Nobody said: --- Michael Lazzaro [EMAIL PROTECTED] wrote: So, to bring this thread back on track *again*, I hopefully offer this summary. 1) Damian's idea of using ~ and ~ as L2R and R2L is well-liked. Thus: @out = grep { ... } map { ... } @in; # (1) (perl5)

RE: L2R/R2L syntax

2003-01-17 Thread Brent Dax
Simon Cozens: # [EMAIL PROTECTED] (Brent Dax) writes: # # could do the same thing with a sub with a prototype of # # (block, *@list). # # Great. That could mean it won't work right for # MyCustomArrayLikeThing. # # Can you explain what you mean by this, because it's not # apparent to me

Re: L2R/R2L syntax

2003-01-17 Thread Jonathan Scott Duff
On Fri, Jan 17, 2003 at 09:57:47AM -0800, Mr. Nobody wrote: --- Michael Lazzaro [EMAIL PROTECTED] wrote: @out = grep { ... } ~ map { ... } ~ @in; # (2) (perl6) @out ~ grep { ... } ~ map { ... } ~ @in; # (3) @in ~ map { ... } ~ grep { ... } ~ @out; # (4) I have to

RE: L2R/R2L syntax

2003-01-17 Thread Mr. Nobody
--- Thom Boyer [EMAIL PROTECTED] wrote: Mr. Nobody [mailto:[EMAIL PROTECTED]] groused: I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. Some of us like it because we've wanted something like it for years.

Re: L2R/R2L syntax

2003-01-17 Thread Austin Hastings
You've overlooked ~| or ~ or whatever that operates on context by default. given @foo { ~ classify ~ @categories; ~ sort - @sorted_foo; ~ improve ~ @bar; }; Personally, I'd like to see that syntax improved a little. Anyway, I'd suggest that the order of execution of lines

Re: L2R/R2L syntax

2003-01-17 Thread Graham Barr
On Fri, Jan 17, 2003 at 06:21:43PM +, Simon Cozens wrote: [EMAIL PROTECTED] (Mr. Nobody) writes: I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. And map/grep aren't specialized syntax, you could do the

Re: L2R/R2L syntax

2003-01-17 Thread Simon Cozens
[EMAIL PROTECTED] (Brent Dax) writes: # # could do the same thing with a sub with a prototype of # # (block, *@list). OK. Let's say I'm implementing HugeOnDiskArray, and instead of slurping the array in and grepping over it, I want to grab the elements one at a time, run them through the

Re: L2R/R2L syntax

2003-01-17 Thread Simon Cozens
[EMAIL PROTECTED] (Paul Johnson) writes: I trust that we are all sufficiently grown up and devoid of marketing hype that we can judge suggestions on their own merit. Do you need pointing to the archives at this point? -- DYSFUNCTION: The Only Consistent Feature of All of Your

Re: L2R/R2L syntax

2003-01-17 Thread Angel Faus
I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. And map/grep aren't specialized syntax, you could do the same thing with a sub with a prototype of (block, *@list). I have to say that I am not specially

RE: L2R/R2L syntax

2003-01-17 Thread Austin Hastings
--- Brent Dax [EMAIL PROTECTED] wrote: Simon Cozens: # [EMAIL PROTECTED] (Brent Dax) writes: # # could do the same thing with a sub with a prototype of # # (block, *@list). # # Great. That could mean it won't work right for # MyCustomArrayLikeThing. # # Can you explain what you

Re: L2R/R2L syntax

2003-01-17 Thread Jonathan Scott Duff
On Fri, Jan 17, 2003 at 06:21:43PM +, Simon Cozens wrote: [EMAIL PROTECTED] (Mr. Nobody) writes: I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. And map/grep aren't specialized syntax, you could do the

Re: L2R/R2L syntax

2003-01-17 Thread Adam D. Lopresto
I'd like to point out one thing that I'm not sure of. It seems like the original proposal only allowed for the operators to change terms around. So given the same (1)-(4) from the message, (4) is exactly the same as (1), and (2) and (3) are exactly the same as each other and as @out

Re: L2R/R2L syntax

2003-01-17 Thread Petras
* Mr. Nobody [EMAIL PROTECTED] [2003-01-17 19:55:41]: --- Michael Lazzaro [EMAIL PROTECTED] wrote: @out ~ grep { ... } ~ map { ... } ~ @in; # (3) @in ~ map { ... } ~ grep { ... } ~ @out; # (4) I have to wonder how many people actually like this syntax, and how many only say

Re: L2R/R2L syntax

2003-01-17 Thread Dave Whipp
Mr. Nobody [EMAIL PROTECTED] wrote : I have to wonder how many people actually like this syntax, and how many only say they do because it's Damian Conway who proposed it. And map/grep aren't specialized syntax, you could do the same thing with a sub with a prototype of (block, *@list). I 50%

Re: L2R/R2L syntax

2003-01-17 Thread Michael Lazzaro
On Friday, January 17, 2003, at 09:57 AM, Mr. Nobody wrote: And map/grep aren't specialized syntax, you could do the same thing with a sub with a prototype of (block, *@list). The specialized part is that, in perl5, it's: @out = grep { ... } map { ... } @in; instead of: @out = grep {

Re: L2R/R2L syntax

2003-01-17 Thread Simon Cozens
[EMAIL PROTECTED] (Michael Lazzaro) writes: ...the absence of the commas is what's special. If they were normal functions/subroutines/methods/whatever, you would need a comma after the first argument This is plainly untrue. See the perlsub documentation, which talks about creating your own

Re: L2R/R2L syntax

2003-01-17 Thread Buddha Buck
Michael Lazzaro wrote: So, to bring this thread back on track *again*, I hopefully offer this summary. 1) Damian's idea of using ~ and ~ as L2R and R2L is well-liked. Thus: @out = grep { ... } map { ... } @in; # (1) (perl5) becomes any of the following: @out =

Re: L2R/R2L syntax

2003-01-17 Thread Michael Lazzaro
On Friday, January 17, 2003, at 10:41 AM, Dave Whipp wrote: But then we shift our perception to think that - is an L2R pipe into a block: not an anonymous sub composer. Similarly, the Cfor function is a strange thing sends its elements down the pipe, one-by-one -- its not a loop at afterall! (A

RE: L2R/R2L syntax

2003-01-17 Thread Brent Dax
Buddha Buck: # My impression was that ~ and ~ were more general than that, # and mainly # did syntax-rewriting. Correct. # So (4) above was translated in the parsing stage to be # exactly identical # to (1), by the following conversions: # ## original (4) #@in ~ map { ... } ~ grep {

Re: L2R/R2L syntax

2003-01-17 Thread Mark J. Reed
On 2003-01-17 at 19:00:04, Simon Cozens wrote: This is plainly untrue. See the perlsub documentation, which talks about creating your own syntax with the prototype. You can do all this in Perl 5, and it saddens me that some of the people redesigning Perl don't know what Perl can do. Well, if

Re: L2R/R2L syntax

2003-01-17 Thread David Storrs
On Fri, Jan 17, 2003 at 11:03:43AM -0800, Michael Lazzaro wrote: And note that as pretty as - is, we couldn't have - for piping because it would conflict rather strongly things like if ($a-5)# (negative five, or pipelike?) Pipelike. Longest token rule. --Dks

Re: L2R/R2L syntax

2003-01-17 Thread Mark J. Reed
On 2003-01-17 at 14:15:46, I wrote: But as I see it, the real problem being solved by the new syntax is that grep and map can exist solely as methods on some class in the inheritance tree of @arrays, no global functions required. That is a Good Thing. I realize that such also be true if we

Re: L2R/R2L syntax

2003-01-17 Thread Buddha Buck
Brent Dax wrote: Incorrect. The translation sequence is: @in ~ map { ... } ~ grep { ... } ~ @out ((@in ~ map { ... }) ~ grep { ... }) ~ @out ((@in.map({ ... })).grep({ ... })) ~ @out @out=((@in.map({ ... })).grep({ ... })) @[EMAIL PROTECTED]({ ... }).grep({ ... }) The only difference

Re: L2R/R2L syntax

2003-01-17 Thread Michael Lazzaro
On Friday, January 17, 2003, at 11:00 AM, Simon Cozens wrote: [EMAIL PROTECTED] (Michael Lazzaro) writes: ...the absence of the commas is what's special. If they were normal functions/subroutines/methods/whatever, you would need a comma after the first argument This is plainly untrue. See

Re: L2R/R2L syntax

2003-01-17 Thread Mr. Nobody
--- Michael Lazzaro [EMAIL PROTECTED] wrote: On Friday, January 17, 2003, at 11:00 AM, Simon Cozens wrote: [EMAIL PROTECTED] (Michael Lazzaro) writes: ...the absence of the commas is what's special. If they were normal functions/subroutines/methods/whatever, you would need a comma after

Re: L2R/R2L syntax

2003-01-17 Thread Damian Conway
Dave Whipp wrote: But the squiggly arrow doesn't seem right. I contrast it with the anonymous sub composer (-) which was chosen, I think, because it worked well in the context of a Cfor loop. Consider the following: $\ = |; $, = ,; Except, of course, those won't exist in Perl 6. You want

Re: L2R/R2L syntax

2003-01-17 Thread Austin Hastings
--- Damian Conway [EMAIL PROTECTED] wrote: We should bear in mind that Larry has had some health issues. And that he's currently unemployed with four children to support. Maybe he could find work hacking perl. I've heard he's pretty good... ;-) =Austin

Re: L2R/R2L syntax

2003-01-17 Thread Joseph F. Ryan
Mark J. Reed wrote: On 2003-01-17 at 19:00:04, Simon Cozens wrote: This is plainly untrue. See the perlsub documentation, which talks about creating your own syntax with the prototype. You can do all this in Perl 5, and it saddens me that some of the people redesigning Perl don't know what

Re: L2R/R2L syntax

2003-01-17 Thread Damian Conway
Buddha Buck wrote: My impression was that ~ and ~ were more general than that, and mainly did syntax-rewriting. You can certainly think of it as syntax rewriting (though, personally, I don't). What ~ and ~ do is to (respectively) allow arguments and invocants to appear in a different position

Re: L2R/R2L syntax

2003-01-17 Thread Damian Conway
Buddha Buck wrote: Brent Dax wrote: Incorrect. Hmmm, I must have misunderstood Damian's suggestion when he said (quoting Damian Conway) Suppose ~ takes its left argument and binds it to the end of the argument list of its right argument, then evaluates that right argument

Re: L2R/R2L syntax

2003-01-17 Thread Mark J. Reed
On 2003-01-17 at 17:17:03, Joseph F. Ryan wrote: But as I see it, the real problem being solved by the new syntax is that grep and map can exist solely as methods on some class in the inheritance tree of @arrays, no global functions required. That is a Good Thing. In your opinion.

RE: L2R/R2L syntax [x-adr][x-bayes]

2003-01-17 Thread Garrett Goebel
From: Damian Conway [mailto:[EMAIL PROTECTED]] We should bear in mind that Larry has had some health issues. And that he's currently unemployed with four children to support. Other matters are taking precedence at the moment. Hmm... If the Larry and the Perl Foundation would be agreeable.

RE: L2R/R2L syntax

2003-01-17 Thread Brent Dax
Damian Conway: # Brent Dax wrote: # Incorrect. # No. Your reading was correct. This is a rare case of Brent # being mistaken. Ack, sorry to both you and Buddha, and anyone else I inadvertently confused. Well, at least I'm good enough for this to be considered a rare case. :^) --Brent Dax

RE: L2R/R2L syntax

2003-01-17 Thread Brent Dax
Damian Conway: # What ~ and ~ do is to (respectively) allow arguments and # invocants to appear in a different position to normal: # arguments to the left of the subroutine/method name, and # invocants to the right of the method's argument list. # # So, for subroutine arguments, these are

Re: L2R/R2L syntax [x-adr][x-bayes]

2003-01-17 Thread Damian Conway
We should bear in mind that Larry has had some health issues. And that he's currently unemployed with four children to support. Other matters are taking precedence at the moment. Hmm... If the Larry and the Perl Foundation would be agreeable. I'd just as soon see a grant set up for Larry again

Re: L2R/R2L syntax

2003-01-17 Thread Damian Conway
Brent Dax asked: So @a ~ grep { ... } ~ @b Is the same as @b = grep { ... } @a Yes. As in... class Array { ... method grep (Array $ary: Code $code) returns Array { ... } method grep (Code $code: Array $ary) returns Array { ... } } No. As in: sub grep

Civility, please. (was Re: L2R/R2L syntax)

2003-01-17 Thread Michael Lazzaro
On Friday, January 17, 2003, at 02:17 PM, Joseph F. Ryan wrote: Mark J. Reed wrote: On 2003-01-17 at 19:00:04, Simon Cozens wrote: This is plainly untrue. See the perlsub documentation, which talks about creating your own syntax with the prototype. You can do all this in Perl 5, and it

Re: L2R/R2L syntax [x-adr][x-bayes]

2003-01-17 Thread Paul Johnson
On Fri, Jan 17, 2003 at 03:10:48PM -0800, Damian Conway wrote: It's my understanding that TPF is not intending to offer Larry (or Dan) another grant for 2003. They feel that too many people have come to see TPF's role and contribution to have been limited to Perl 6 (though funding Dan was in

  1   2   3   >