Linux Format

The best language ever?

-

Which scripting language is the best? Obviously, it depends on whom you address. For a veteran systems administra­tor, sh is a way to go. Should you ever need more, awk and sed are always here to help. Oh, and there’s also Perl, in case you have forgotten.

“No-no-no”, his younger colleague says. Nobody wants to code in a language which doesn’t even know the difference between [ and [[. Even with newer implementa­tions such as Bash, shell scripts are clumsy, unreadable and full of black magic. The same stands for Perl, and you never hire a guy who knows sed, because he would write everything in sed then.

Ridiculous as it sounds, both are right. The best language isn’t anything absolute: it’s a function of the problem you solve, who solves it, and who’s going to maintain this solution. The last point is important. The code is written once yet changed many times. So your rich background in sed doesn’t make it the best text-processing language even if it really can do anything. In a company full of Unix veterans, sh and friends could be a perfect choice. In a modern DevOps setting a general-purpose language both a developer and an SRE can understand is perhaps a better choice.

Once again, which language it is depends on the surroundin­gs. I’m not sure if you can do systems administra­tion in JavaScript, yet Node.js evolves quickly, so please let me know if you do. I used to be a big fan of Perl, but it’s also an old hat by now.

For many of us, Python makes a good choice. It’s ubiquitous, it’s clean and it’s lowlevel enough for the systems administra­tion tasks. This doesn’t make it a perfect language for everything, but having your spaghetti scripts human-readable sounds like a worthwhile goal to try, don’t you think?

Newspapers in English

Newspapers from Australia