Re: Something wrong with str.reverse

2010-06-22 Thread Richard Hainsworth
I was going to suggest this too after reading PM's post. I would suggest that for whatever reason a list operator was used on a scalar, including a hold over form another language (Ruby and perl5), a warning should be issued. Most likely to be an error. On 06/21/2010 11:05 PM, yary wrote:

Re: Something wrong with str.reverse

2010-06-22 Thread Smylers
David Landgren writes: On 22/06/2010 09:07, Richard Hainsworth wrote: I was going to suggest this too after reading PM's post. I would suggest that for whatever reason a list operator was used on a scalar, including a hold over form another language (Ruby and perl5), a warning should

Re: Something wrong with str.reverse

2010-06-21 Thread Patrick R. Michaud
On Mon, Jun 21, 2010 at 09:47:37AM +0100, Smylers wrote: Larry Wall writes: On Fri, Jun 18, 2010 at 11:21:52AM +0200, Jan Ingvoldstad wrote: : On Fri, Jun 18, 2010 at 11:15, Smylers smyl...@stripey.com wrote: : : For the benefit of Perl 5 programmers used to string reverse it : would

Re: Something wrong with str.reverse

2010-06-21 Thread Jan Ingvoldstad
On Mon, Jun 21, 2010 at 10:47, Smylers smyl...@stripey.com wrote: Larry Wall writes: On Fri, Jun 18, 2010 at 11:21:52AM +0200, Jan Ingvoldstad wrote: : On Fri, Jun 18, 2010 at 11:15, Smylers smyl...@stripey.com wrote: : : For the benefit of Perl 5 programmers used to string reverse

Re: Something wrong with str.reverse

2010-06-21 Thread yary
Warning on using any list-y op on a scalar seems like a good idea, and the fact that the idea arose after a perl5 misunderstanding now looks like a red herring. That is, while warning on only reverse-on-a-scalar may be a bad idea and perl5 specific, I'd vote for warning on all apparent mis-uses of

Re: Something wrong with str.reverse

2010-06-18 Thread Jan Ingvoldstad
On Fri, Jun 18, 2010 at 11:15, Smylers smyl...@stripey.com wrote: For the benefit of Perl 5 programmers used to string reverse it would be nice to have a warning if reverse is invoked with exactly one string argument (but not with an array which happens to contain a string as its only

Re: Something wrong with str.reverse

2010-06-18 Thread Larry Wall
On Fri, Jun 18, 2010 at 11:21:52AM +0200, Jan Ingvoldstad wrote: : On Fri, Jun 18, 2010 at 11:15, Smylers smyl...@stripey.com wrote: : : : For the benefit of Perl 5 programmers used to string reverse it would be : nice to have a warning if reverse is invoked with exactly one string : argument