On Tue, Jun 22, 2010 at 4:40 AM, David Landgren <da...@landgren.net> wrote: > 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 be >> issued. Most likely to be an error. > > For a nop? Ouch. > > Could this not be pushed off onto a lint-like/PBP analysis? If you want the > compiler to moan about every construct that may not be doing what you think > it's doing... you don't want to do that every time the program is run.
Perhaps a set of macro training wheels for programmers coming from perl5 that can be easily enabled but not by default. > David > >> On 06/21/2010 11:05 PM, yary wrote: >>> >>> 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 list ops on scalars as a generally >>> helpful. > > -- > There's bum trash in my hall and my place is ripped > I've totaled another amp, I'm calling in sick > -- Will "Coke" Coleda