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 be issued. Most likely to be an error. > > For a nop? Ouch.
Not for any possible no-ops; but for those which people are likely to make by mistake and can easily be detected. In the case of reverse it's pretty similar to the list versus scalar check that Perl 5 is currently making in order to determine which action to take. > 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... Not every possible construct, but things at about the same level as those that Perl 5 warns about. > you don't want to do that every time the program is run. no warnings; Smylers -- http://twitter.com/Smylers2