develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [perl #85150] each on an anonymous array constructor doesn'tcomplain, but sorta works

Thread Previous | Thread Next
From:
brian d foy
Date:
January 3, 2012 14:09
Subject:
Re: [perl #85150] each on an anonymous array constructor doesn'tcomplain, but sorta works
Message ID:
CAPk17=4SW_01SiG-fiWG6iYNfDc5xWe8eOq31MYcebP1F+O4_A@mail.gmail.com
> On the contrary, it works perfectly, doing exactly what the statement
> appears to say.

That's why I suggested it should be a warning. It's probably not what
people want.

As for surprising limitations, well, I was surprised. It's another
thing I need to explain with each() when I teach it because I know a
couple of students in each class will try it. It doesn't matter to you
if that makes sense or isn't the way you think. Stupid stuff happens
all of the time. Ignoring that it's going to happen doesn't make it go
away. We could remove most warnings using the same premise, but we
don't because they are a salve for the stupidity we know will happen.

However, this is the end of it for me. Decide what you like and I'll
just add it to the list of quirks that people have to know.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About