At 10:14 AM -0500 3/14/03, Andrew Pimlott wrote:
On Fri, Mar 14, 2003 at 09:30:06AM -0500, Dan Sugalski wrote:
 Still... What exactly about A6 did you dislike? It's a bit big, but
 there's nothing in it that seemed particularly controversial or
 foolish to me, and I tend to get cranky with the new features.

How 'bout this one. (I mean to bring it up on perl6-langage or somewhere, but I haven't done my homework yet, so I'll float it here.)

A6 says that, as in Perl 5, only anonymous subs are closures.  I've
always thought of the fact that Perl 5 named subs are not closures
as a bug kept for compatibility.

Well... there's always the issue that closures are done by instantiating the sub at runtime, while named subs are instantiated at compile time, which causes some difficulties. (As the enclosing sub's lexicals instantiate at runtime, thus giving the contained sub nothing to close over)


Now, if the named lexically scoped sub actually got re-instantiated every time, *that* would be different.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to