Re: lists in string context

2005-03-15 Thread David Storrs
On Sat, Mar 12, 2005 at 09:36:24PM +0100, Juerd wrote: > Larry Wall skribis 2005-03-12 12:26 (-0800): > > And arguably, the current structure of join is that the delimiter is > > the invocant, so cat should be defined as > > ''.join(@foo) > > This is what Python does. It does not make any sen

Re: lists in string context

2005-03-13 Thread Juerd
Larry Wall skribis 2005-03-12 16:03 (-0800): > Just for the record, let me say that I expect the limit parameter > to split to be +$limit and not ?$limit. I think a number of seldom-used > options will go this route. Another consideration is whether the > parameter needs to be considered for MMD.

Re: lists in string context

2005-03-12 Thread Larry Wall
On Sat, Mar 12, 2005 at 03:13:37PM -0600, Rod Adams wrote: : Obviously this can't happen for everything, but for the builtin methods : and classes, I don't see a penalty for supporting both forms. Consider: : :$str.split($rule); :$rule.split($str); : : I can see using both of those. But

Re: lists in string context

2005-03-12 Thread Rod Adams
Juerd wrote: Larry Wall skribis 2005-03-12 12:26 (-0800): And arguably, the current structure of join is that the delimiter is the invocant, so cat should be defined as ''.join(@foo) This is what Python does. It does not make any sense to me, and I can't wrap my mind around it at all. R

Re: lists in string context

2005-03-12 Thread Juerd
Larry Wall skribis 2005-03-12 12:26 (-0800): > Well, we thrashed that one around a lot at one of our meetings, and > the general consensus was that array interpolation and the default > stringification of arrays should probably work the same for consistency. > (Likewise for hashes.) And that the d

Re: lists in string context

2005-03-12 Thread Larry Wall
On Sat, Mar 12, 2005 at 08:37:52PM +0100, Juerd wrote: : Juerd skribis 2005-03-12 20:32 (+0100): : > My gut prefers that both scalar reverse LIST and ~LIST join LIST on ''. : : scalar reverse LIST probably returns an arrayref. : : I meant ~reverse LIST, which should probably do ~LIST at some poin

Re: lists in string context

2005-03-12 Thread Juerd
Juerd skribis 2005-03-12 20:32 (+0100): > My gut prefers that both scalar reverse LIST and ~LIST join LIST on ''. scalar reverse LIST probably returns an arrayref. I meant ~reverse LIST, which should probably do ~LIST at some point instead of join($sep, LIST), for consistency, and my request is t