News for hackers. Stuff that matters.
Re:Mongrel2 Says, "Goodbye Python" by avar on Tuesday September 21, 2010 @07:41AM (#1712202)
In the Git project we target Perl 5.6 for critical code (like git add --interactive) and Perl 5.8 for some other code (like git-svn). Those are 10 and 8 years out of date, respectively. Or the equivalent of targeting Python 1.6 and 2.0.

It can be mildly annoying sometimes to have to use 5.6 features when I usually develop on 5.12 or newer, but Perl's policy of backwards compatibility makes this a lot easier than it would be in Python.

Git also has some Python code that targets 2.4, making it compatible with such an old version was relatively easy (see http://git.kernel.org/?p=git/git.git;a=commit;h=23b093ee087e... for an example). A lot easier anyway than rewriting and maintaining that code in C.

Re:Mongrel2 Says, "Goodbye Python" by jedbrown on Tuesday September 21, 2010 @08:35AM (#1712356)
> equivalent of targeting Python 1.6 and 2.0.

I'm less in touch with Perl language development in the past decade, but 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. This is expected when a language evolves rapidly, but it's rather frustrating to wait 10 years before you can depend on the "new" features being available.

Re:Mongrel2 Says, "Goodbye Python" by avar on Tuesday September 21, 2010 @09:12AM (#1712455)

    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).

Re:Mongrel2 Says, "Goodbye Python" by jacobolus on Tuesday September 21, 2010 @12:12PM (#1713110)
> 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”.

Re:Mongrel2 Says, "Goodbye Python" by phaylon on Wednesday September 22, 2010 @12:19AM (#1715159)
So 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.
Re:Mongrel2 Says, "Goodbye Python" by jedbrown on Tuesday September 21, 2010 @09:32AM (#1712498)

  There'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.
Re:Mongrel2 Says, "Goodbye Python" by avar on Tuesday September 21, 2010 @11:01AM (#1712837)
I 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 and 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.

Re:Mongrel2 Says, "Goodbye Python" by baq on Tuesday September 21, 2010 @01:49PM (#1713439)
> 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.

Re:Mongrel2 Says, "Goodbye Python" by jedbrown on Tuesday September 21, 2010 @02:14PM (#1713512)
Almost, "with" became a keyword.
Re:Mongrel2 Says, "Goodbye Python" by jacobolus on Tuesday September 21, 2010 @12:13PM (#1713112)
Which code was explicitly broken by Python 2.6?
Re:Mongrel2 Says, "Goodbye Python" by SapphireSun on Tuesday September 21, 2010 @08:39PM (#1714726)
iirc 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.
Re:Mongrel2 Says, "Goodbye Python" by berntb on Tuesday September 21, 2010 @08:49AM (#1712398)
This backwards compatibility is a conscious decision. And it is argued about. To find a bit to read about that, Google e.g. for darkpan. (It is probably one reason why Perl 5 is so extensible.)
Re:Mongrel2 Says, "Goodbye Python" by acqq on Tuesday September 21, 2010 @08:59AM (#1712414)
Thanks berntb! That's a perfect tip for a new submission:

http://news.ycombinator.com/item?id=1712404

The DarkPAN matters

"There is currently some FUD going about in some parts of the Perl community about why we should break Perl 5 backwards compatibility. A short blog entry, schmarkpan, is a good example of the trend: loud, noisy, but clueless and devoid of any content."