[SLUG] Script/Interpreter wars

From: Levi Bard (levi@bard.sytes.net)
Date: Thu Oct 17 2002 - 18:36:39 EDT


Here's my opinion (whether you want it or not :) on different scripting languages.

sh is very popular, standard, tested and true, and is installed on nearly every unix machine. In addition, anyone who uses sh or bash as his/her login shell is already accustomed to the syntax; furthermore, sh scripting will increase your prowess with interactive shell commands and vice versa. It's great for automating tasks you would normally do by typing a series of commands at the prompt.

perl has become more popular, and is installed on most modern unix machines. The syntax (an intermingling of C, sh, and its own rules) must be learned by the new user - and, unless the coder keeps readability as a priority at all times, perl code can tend to look like modem noise. However, if you want something that's a little more structured (or object-oriented) than a shell script, perl can be a great tool. (BTW, perl regexps are extended somewhat from those that sed honors, so a user going from perl to sed could become a little frustrated).

python is becoming very popular, mainly due to the fact that it has several powerful built-in libraries for things like GUI, networking, etc. Unfortunately, these libraries can also be a handicap. Python is still changing very much from version to version, and python apps tend to depend on specific versions of libraries that depend on specific versions of the python interpreter. I once had 4 versions of python installed on a system just to run 5 or 6 applications. Also, I have a pet peeve with python because it tries to tell me where to put my whitespace.

expect is an extension of tcl, and I'm mentioning it here for one reason: interactivity. expect is GREAT for automating tasks where one normally has to interact with some processes on the command line, like telnet or ftp. Like all the others except sh, the syntax is unique and has to be learned, and it can seem pretty nonintuitive to a new user.

My eight cents,
Levi



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:22:45 EDT