On 01.08.2013 01:35, Ricardo SIGNES via RT wrote: > On Tue Jul 30 16:05:09 2013, sprout wrote: >> In short: closures close over variables, not lexical scopes, unless >> string eval is involved. (So one can work around this by including eval >> "" in the sub.) > > When did this become true in practice? > > It does not match up with what I take to be common definition of closures as enclosing a > complete environment. I agree that PadWalker is letting Perl programmers go beyond the realm > of polite behavior, but let's put that aside. Heh. I never think about "complete environments" or anything like that. My mental model works with variables only ("function X closes over variables A and B"). I'm surprised to learn the common definition works differently. Just my 2 cents -- Lukas Mai <plokinom@gmail.com>Thread Previous | Thread Next