develooper Front page | perl.perl5.porters | Postings from February 2008

Re: a warning I'd like to see

Thread Previous | Thread Next
February 18, 2008 01:38
Re: a warning I'd like to see
Message ID:
On 25/01/2008, Aristotle Pagaltzis <> wrote:
> * David Nicol <> [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.


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About