Re: Smooth or Chunky?

2007-01-26 Thread Brad Bowman
languages would probably just default to returning a structured value and force the user to flatten explicitly. That doesn't seem much like the Perl Way though... That might not be so bad. Could the chunky/smooth context information come from List/Capture context? I'm not sure if that distinction

Re: Smooth or Chunky?

2007-01-24 Thread Ben Morrow
Quoth [EMAIL PROTECTED] (Larry Wall): I should also mention I did (briefly) consider the null reduce operator: [] zip(1,2;3,4) to mean slap [] around each element, but it runs into ambiguity with the existing [] form indicating an empty list. Would using [[]] instead work? This is

Re: Smooth or Chunky?

2007-01-24 Thread Ruud H.G. van Tol
Larry Wall schreef: the point is *not* to force it one way or the other--the point is that many such functions would probably prefer not to commit one way or the other, and they can't do that if they automatically throw away the dimensional information. Like with numbers, this looks to me

Re: Smooth or Chunky?

2007-01-24 Thread Blair Sutton
have a special .| form if the default where .=, but .= is taken already so .| can't be the default there. Maybe something else is better than = there. Or maybe we need a naming convention that distinguishes smooth/chunky variants of all the named functions/methods. Then we have the non-commital

Re: Smooth or Chunky?

2007-01-24 Thread Austin Frank
On Tue, Jan 23 2007, Larry Wall wrote: ... Basically, this is the inverse of [;], which turns LoA into a CoC. [;] chunky mumble() But chunky is clunky, and I'm wondering what syntactic relief we can give ourselves here. ... (That almost suggests it should be another metaoperator.

Smooth or Chunky?

2007-01-23 Thread Larry Wall
a naming convention that distinguishes smooth/chunky variants of all the named functions/methods. Then we have the non-commital form: map the smooth form Xmap mapX and the chunky form Ymap mapY for some value of X and Y. But that approach starts to get a bit obnoxious

Re: Smooth or Chunky?

2007-01-23 Thread Darren Duncan
At 6:22 PM -0800 1/23/07, Larry Wall wrote: Recently I started redefining Cmap to return multislices such that map { $_, $_ * 10 }, 1..3 seems to return 1,10,2,20,3,30 by default, but in a multidimensional context: @@multislice := map { $_, $_ * 10 }, 1..3 it would have the value

Re: Smooth or Chunky?

2007-01-23 Thread Larry Wall
On Tue, Jan 23, 2007 at 07:23:31PM -0800, Darren Duncan wrote: : At 6:22 PM -0800 1/23/07, Larry Wall wrote: : Recently I started redefining Cmap to return multislices such that : : map { $_, $_ * 10 }, 1..3 : : seems to return 1,10,2,20,3,30 by default, but in a multidimensional : context: