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 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 element). > : > : Perhaps if one uses a "use P5warnings" or something? > : > : Such warnings can become quite awful as Perl 6 grows and matures.
I was only thinking about that specific warning, not generally warnings that might be of use to Perl 5 programmers. And I don't see how warning about calling reverse on a scalar would be awful. It isn't something that makes sense to do (it's a no-op), and it isn't just former Perl 5 programmers who might make that mistake; anybody who does could be warned about it. > It's hard to know how to do that. If you make it the default to not > warn, then the people who really need the warnings will almost never > turn them on. Yeah, for this specific case my request is a warning by default. Smylers -- http://twitter.com/Smylers2