Haskell as an alternative to Perl for scripting tasks.

For the past couple of weeks I have been working with a very interesting system administrator. He’s responsible for maintaining a large number of Web servers, mail servers, and database servers. Like most system administrators, he employs a number of scripts he’s developed to automate a variety of tasks. While most sysadmins would use a language like Perl or Python for developing their scripts, this fellow uses Haskell. Of course, I asked him why he used Haskell. His answers really aren’t surprising to somebody who has used Haskell before.

The first benefit he found was that Haskell’s rich feature set allowed him a great deal of flexibility when it came to quickly getting scripts written. He was particularly fond of its excellent list handling capabilities, notably list comprehensions. Haskell’s pattern matching support was another plus for him.

He also found Haskell’s static typing to be essential. At one point, he told me something along the lines of, “When my program compiles and typechecks, it almost always works.” Not having to worry about unexpected type-related errors causing problems at runtime made him feel more comfortable with using Haskell for long-running scripts.

He also said he was impressed by GHC, the Haskell implementation he chose to use. Its interpreter allowed him to rapidly test out code snippets, but he could then eventually compile his code to machine code for greater performance.

Maybe it’s time for more system administrators to start looking into the use of Haskell for their scripting tasks. Although it’s no doubt not ideal for all users, it does offer many benefits that many users would find useful. Haskell seems to have made the life of this one administrator quite a bit easier, and might do the same for others.

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word