3 ms·
My impression is that the difference between Perl-5.6 and Perl-5.12 is much less than between these versions of Python and recent releases. Your impres
by avar 16y ago
My impression is that the difference between Perl-5.6
and Perl-5.12 is much less than between these versions
of Python and recent releases.
Your impression is correct. Perl is a more mature platform than Python, and backwards compatibility is taken more seriously. The latest Perl 5.12 release can still run most of the test suite for Perl 1 released back in 1987.
That and its wide availability and portability make it a much better target than Python for something like glue in a build system for a project that's mostly in C anyway.
But even though it's backwards compatible with old code it's still somewhat of a pain to write code that works on old releases that don't have the modules / core features you want.
Backwards compatibility also comes at a price. Many of the changes that broke old Python code broke it because old warts were being fixed in Python. There's a lot of equivalent old warts in Perl that haven't been fixed, and there's no plan for doing so (other than Perl 6).
- jedbrown 16y agoThere's a lot of equivalent old warts in Perl that haven't been fixed This is the crux of the issue. Serious language users (especially the ones writing the new libraries that add significant value to your platform) want the warts fixed to make the environment pleasant to work in. Meanwhile, most casual users are desperate for backward compatibility because it makes distribution easier. I actually prefer Python's choice, but pain is inevitable either way.
- avar 16y agoI should have said: They haven't been fixed by default. Perl is also moving forward, it's just doing so differently than Python. Python has major releases like 2.6 and 3.0 where they explicitly break old code in the default installation. Perl however doesn't break any of the old warts by default, but developers can easily do so by importing modules like Moose and perl5i in their own code. See http://search.cpan.org/perldoc?Moose http://search.cpan.org/perldoc?Moose and http://search.cpan.org/perldoc?perl5i http://search.cpan.org/perldoc?perl5i Perl's model means that you can usually upgrade any code base from say 5.6 to 5.12 without major headaches. But if you try to do the equivalent with Python 1.6 to 3.0 you'll run into trouble. There are advantages to both models, but with Perl's you rarely see users with big legacy code bases staying behind on some legacy 10 year old release of Perl that may have bugs and security issues. Users usually just upgrade along with their OS without any major pains.
- jacobolus 16y agoWhich code was explicitly broken by Python 2.6?
- SapphireSun 16y agoiirc nothing was, but it made available some features that would be used in 3.0 and 2.7 is essentially a back-port of stuff the 3.0 people found useful. I believe the idea is that in a major version number, everything is back compatible.
- baq 16y ago> Perl is also moving forward, it's just doing so differently than Python. Python has major releases like 2.6 and 3.0 where they explicitly break old code in the default installation. 3.0 yes, but 2.6 is simply not true. code written for 2.2 will work in 2.6, bugs notwithstanding.
- jedbrown 16y agoAlmost, "with" became a keyword.
- jacobolus 16y ago> Perl is a more mature platform than Python, and backwards compatibility is taken more seriously. That's a silly thing to say w/r/t Python 2.x. What makes people’s Python 2.5 code not run on Python 2.2 (or 1.x) is that new features were added in the mean time. New very shiny happy features that make life a lot easier for developers. Almost all python code continues to work from one version to the next, and it’s easy to write code that will work on all the versions from 2.2 to the present (or whatever), as long as you’re willing to avoid all the nifty stuff. Basically by “backwards compatibility“ you mean “forward compatibility”.
- phaylon 16y agoSo did Perl 5. The difference seems to be that for the newer Perl features you have to either declare the version of Perl you're depending on or import the feature explicitly.