On 25/01/2008, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote: > * David Nicol <davidnicol@gmail.com> [2008-01-25 00:50]: > > alert me when I give map an arrayref instead of an array > > Sorry, no. I've passed complex data structures to `map` more > times than I care to remember. This wouldn't be a warning, it > would be a nag screen. > > > $ perl -le 'use warnings; print join "|", map {$_ + 2} [ 1..6 ]' > > 268504834 > > This would be caught by the stricture that MJD proposed a few > weeks ago, where stringifying or numifying references is > forbidden. That would trap a bunch of hard-to-find mistakes I've > made while almost never getting in my way. Let me start a new > thread… ST is one place where we could really use python style tuples. It is slowed down quite a bit by the construction cost of manufacturing loads of tiny little arrays. If we had tuples we could make things like ST much more efficient. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next