Front page | perl.perl5.porters |
Postings from October 2009
Re: do SUBROUTINE(LIST)
October 27, 2009 01:45
Re: do SUBROUTINE(LIST)
Message ID: firstname.lastname@example.org
On Tuesday 27 October 2009 00:38:29 Tom Christiansen wrote:
> You're also assuming anything "deprecated" is cursed to die,
> now aren't you? If so, that remains unproven.
Yes, I do assume that.
Either of us could provide an extensive exegesis about the uses of the word
"deprecated" in the Perl 5 documentation and supporting material. I suspect
there are many shades of meaning and, were either of us inclined to
deconstructionism, we could have an interesting discussion of who wrote
various sentences at various times, but blead's perlglossary.pod says:
Deprecated modules and features are those which were part of a stable
release, but later found to be subtly flawed, and which should be avoided.
They are subject to removal and/or bug-incompatible reimplementation in
the next major release (but they will be preserved through maintenance
releases). Deprecation warnings are issued under B<-w> or C<use
diagnostics>, and notices are found in L<perldelta>s, as well as various
other PODs. Coding practices that misuse features, such as C<my $foo if
0>, can also be deprecated.
I see more than a hint of the RFC-style MAY in there, but detect no whiff of
Note that some of the diagnostics in perldiag.pod say "will be removed" --
:locked and :unique for example. Some refer to features already removed.
> You would without justification break every program written from
> that period which happened to have subroutines.
I think that may overstate the case somewhat. Those programs will still work
with every one of the (by my count at least) 35 stable releases of Perl made
since Perl 1.000.
> I cannot fathom the motivation behind such mischief.
The current Perl 5 grammar in bleadperl is 1359 lines of code. That includes
comments and whitespace. The grammar rules to make 'do SUBNAME' work take up
42 lines of code and contain no comments and whitespace. Rough math tells me
that 3% of the Perl 5 grammar exists solely to support this feature,
deprecated at least since May 1997.
Is that an undue burden? Is it worth keeping around that code? Is it worth
downgrading that deprecation to a mere imprecation, a potential new term of
art which does not scent itself with the whiff of potential removal? Is being
able to say "Most programs written to run on Perl 1 still run on Perl 5.12
unmodified" worth 3% of the Perl 5 grammar?
I'm not going to answer those questions. (In part, I'm still not sure what I
think about this specific deprecation.) I merely want to clarify what
"deprecated" means and help figure out good criteria to use to handle future