Re: 'x' vs. 'xx'

2007-06-03 Thread Chas Owens
On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote: Chas Owens wrote: Jonathan Lang wrote: Is there any reason why we can't simply define '$a x $n' as being shorthand for 'cat($a xx $n)'? In what way does the former differ from the latter, other than the use of a Whatever in place of $n?

Re: 'x' vs. 'xx'

2007-06-03 Thread Jonathan Lang
Chas Owens wrote: Jonathan Lang wrote: Chas Owens wrote: Jonathan Lang wrote: Is there any reason why we can't simply define '$a x $n' as being shorthand for 'cat($a xx $n)'? In what way does the former differ from the latter, other than the use of a Whatever in place of $n? $a

Re: 'x' vs. 'xx'

2007-06-03 Thread Chas Owens
On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote: Chas Owens wrote: Jonathan Lang wrote: Chas Owens wrote: Jonathan Lang wrote: Is there any reason why we can't simply define '$a x $n' as being shorthand for 'cat($a xx $n)'? In what way does the former differ from the latter,

Re: 'x' vs. 'xx'

2007-06-03 Thread Jonathan Lang
Chas Owens wrote: I am almost certain that the following code is in list context. pugs my @a = '-' x 5, 'foo', '-' x 5; pugs @a (-, foo, -) pugs my @b = cat('-' xx 5), 'foo', cat('-' xx 5) (-, -, -, -, -, foo, -, -, -, -, -) However, it does seem that Pug's version of cat does not

Re: 'x' vs. 'xx'

2007-06-03 Thread Mark J. Reed
Is item context what we're calling scalar these days, or something else? On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote: Chas Owens wrote: I am almost certain that the following code is in list context. pugs my @a = '-' x 5, 'foo', '-' x 5; pugs @a (-, foo, -) pugs my @b =

Re: 'x' vs. 'xx'

2007-06-03 Thread Jonathan Lang
Mark J. Reed wrote: Is item context what we're calling scalar these days, or something else? According to S03, it does indeed appear that item context is the current terminology for what perl 5 called scalar context: The item contextualizer item foo() The new name for Perl 5's scalar

Re: 'x' vs. 'xx'

2007-06-03 Thread Chas Owens
On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote: snip From what you're saying, I get the impression that you think that '-' x 5 ought to produce a single string of five dashes regardless of whether the context is item or list. Correct? (Note: I'm not asking about what the spec says, since

Re: 'x' vs. 'xx'

2007-06-03 Thread Jonathan Lang
Chas Owens wrote: The current Perl 5 behavior is [EMAIL PROTECTED]:~$ perl -le 'my @a = (- x 5, foo, - x 5); print @a' - foo - [EMAIL PROTECTED]:~$ perl -le 'my @a = ((-) x 5, foo, (-) x 5); print @a' - - - - - foo - - - - - I am against anything other than that for x or xx without a

'x' vs. 'xx'

2007-06-02 Thread Jonathan Lang
Is there any reason why we can't simply define '$a x $n' as being shorthand for 'cat($a xx $n)'? In what way does the former differ from the latter, other than the use of a Whatever in place of $n? -- Jonathan Dataweaver Lang

Re: 'x' vs. 'xx'

2007-06-02 Thread Chas Owens
On 6/2/07, Jonathan Lang [EMAIL PROTECTED] wrote: Is there any reason why we can't simply define '$a x $n' as being shorthand for 'cat($a xx $n)'? In what way does the former differ from the latter, other than the use of a Whatever in place of $n? -- Jonathan Dataweaver Lang $a x $n is

Re: 'x' vs. 'xx'

2007-06-02 Thread Jonathan Lang
Chas Owens wrote: Jonathan Lang wrote: Is there any reason why we can't simply define '$a x $n' as being shorthand for 'cat($a xx $n)'? In what way does the former differ from the latter, other than the use of a Whatever in place of $n? $a x $n is equivalent to join '', $a xx $n, but that