Unix portability and scripting language versions

February 22, 2010

By and large it's not too difficult to write portable Unix shell scripts (at least once you burn your fingers a time or two, and it helps to have one of the old-fashioned Unixes around so you get that experience early). But here's something that I've been thinking about recently: the portability issue of scripting language versions.

It's not news that these days an increasing amount of programming is being done not in the Bourne shell but in the various scripting languages such as Perl, Python, and Ruby. At the same time, different Unixes can have quite divergent versions of the scripting language interpreters; consider Python's spread of versions, for example.

Well, actually, not quite. Because it looks like Python is the exception that proves the rule; both Ruby and Perl are very close to the same version across quite a number of different Unixes. Quite recent Linux distributions have Perl 5.10 instead of Perl 5.8.<something> but that seems to be about the only exception, and Ruby is remarkably stable at some patchlevel of 1.8.6 on almost everything that has it. (Solaris 10 does not yet ship with a stock version of Ruby and an old FreeBSD machine has Ruby 1.6.7.)

The one potential future issue is that at least one and perhaps all three of these languages are likely to soon have significant, not entirely backwards compatible changes in their nominal main versions. However, pragmatically I expect this to play out over the short term (say the next three to five years) as adding new scripting languages, not changing the versions of the current ones; in effect, Unixes will probably add Python 3, not change their version of Python to be Python 3.

(Python 3 exists but adoption may be slow, future version changes of Ruby are pretty solidly going to happen but I don't know when and how big of a change they will be, and who knows about Perl 6 by now.)


Comments on this page:

From 78.35.25.18 at 2010-02-24 07:58:49:

Perl is not going to be the one with breaking changes. What started as the next version has evolved to be a new member in the same family of languages. So we speak these days of Perl 5 version 10 and the various implementations of Perl 6 (different people have started different ones at various states of completion, although the one on Parrot is furthest along). Perl 5 is not going to be replaced by Perl 6 and is not going away any time soon.

Aristotle Pagaltzis

Written on 22 February 2010.
« It's sinking in that Sun is gone
What Linux's getaddrinfo() is doing with IPv6 (on some versions) »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Feb 22 01:48:32 2010
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.