Wandering Thoughts archives


Unix portability and scripting language versions

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

unix/ScriptingLangPortability written at 01:48:32; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.