[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: last dynamically scoped()? (was Re: [FWP] awww, no fun :()



On Fri, Apr 13, 2001 at 08:39:20AM -0400, Mike Lambert wrote:
> What makes this action at a distance this different from every other
> function that potentially shields unfriendly perl code?

Because this one DOESN'T DO ANYTHING USEFUL.  All the other things you
mentioned do things which it would be very difficult to do any other
way (although some of them should/do have better ways, like $/).
Enough to justify busting encapsulation.  This last() trick doesn't.

Furthermore, just because there's ten things that are Bad doesn't mean
we should have an eleventh.


> While ,I don't think people should use last, I don't think it should be
> forcibly deprecated in Perl 5. I think I've actually written code that
> might rely on it, somewhere in some production system I've long since
> forgotten about.

Deprecated != eliminate.  It just a strong way of saying "Don't use
this anymore!  Really, we mean it."  It already throws a warning, so
it wouldn't do any worse (deprecated warnings are optional).
Basically, its just upgrading "Exiting subroutine via %s" to a (D)
instead of a (W) and altering the docs a bit.  More of a principle
thing than anything else.  And paving the way for Perl 6.


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>	     Kwalitee Is Job One
Don't worry, baby, my wrath can be pretty groovy.
	http://www.goats.com/archive/980804.html

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe