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

2003-01-23 Thread Michael Lazzaro
On Wednesday, January 22, 2003, at 07:40 PM, Thomas A. Boyer wrote: I have a strong suspicion that this possibility was carefully considered by {LW, DC, ...} (that's set notation, not a code block :) before the Apocalypse 4 pointy sub syntax (and the for-loop syntax using it) was

RE: Array/Colon question

2003-01-23 Thread Brent Dax
Michael Lazzaro: # Here's something that I'm still confused about. # # We have: # # print STDOUT : $a; Presumably you forgot the $ on that STDOUT. # as indirect object syntax. The colon means STDOUT is the # object we're # operating on. It works everywhere. We also have # # for

Re: Why Cmap needs work

2003-01-23 Thread fearcadi
Michael Lazzaro writes: Think, think. What do these things have in common? # known from A4 for @a, sub ($x) {...} # primitive spelling for @a - $x {...} # pointy sub, looks great map {...} @a # old-style map syntax map sub

Re: Why Cmap needs work

2003-01-23 Thread Dan Sugalski
At 11:02 AM -0800 1/23/03, Michael Lazzaro wrote: Yes, no doubt so, and good point. I think I should make it clear that my speculation on somehow unifying Cfor and Cmap is _not_ an attempt to gut A4, because I like A4 quite a lot. I'm just thinking out loud about how we could _extend_ A4 in

RE: A proposal for separable verbs.

2003-01-23 Thread Austin Hastings
--- Austin Hastings [EMAIL PROTECTED] wrote: --- Brent Dax [EMAIL PROTECTED] wrote: Except that none of the other ones exist in Perl 6. :^) Thinking about this some more, and considering the desirability of lazy evaluation, I think incremental execution might be the right way. (Also, at

Multimethod/multisub thought...

2003-01-23 Thread Piers Cawley
In my quest to eliminate as many explicit conditionals from my code as possible, I found myself wondering if Perl 6's multidispatch mechanism would allow one to write: sub gmttime ( $time = time() ) is in_scalar_context { strftime( $perls_default_time_format, $time ); } sub

Re: Multimethod/multisub thought...

2003-01-23 Thread Dan Sugalski
At 7:30 AM + 1/24/03, Piers Cawley wrote: In my quest to eliminate as many explicit conditionals from my code as possible, I found myself wondering if Perl 6's multidispatch mechanism would allow one to write: sub gmttime ( $time = time() ) is in_scalar_context { strftime(