Article 4YH9N Go Compared to Python for Small Scale System Administration Scripts and Tools

Go Compared to Python for Small Scale System Administration Scripts and Tools

by
martyb
from SoylentNews on (#4YH9N)

An Anonymous Coward writes:

Go compared to Python for small scale system administration scripts and tools:

We write a certain amount of scripts and tools around here. I like Go and have used it for awhile, we have some tools already written in Go,and while I'm also a long term user of Python I'm on record as beingunhappy with various developments around Python 3. Despite all of this,Python is the programming language I default to when I need to dosomething that's more complicated than a shell script (and not becauseof our policy on internal tools). Over timeI've come to believe that Python has some important pragmatic propertiesin our sort of relatively small scale environment with generally modestuse of local tools, despite Go's collection of appealing properties.

The first useful property Python has is that you can't misplace thesource code for your deployed Python programs. Unless you do somethingvery peculiar, what you deploy is the source code (well, a version ofit). With Go you deploy a compiled artifact, which means that you maysomeday have to find the source code and then try to match your compiledbinary up against some version of it. Of course your deployed Pythonprogram can drift out of sync with the master copy in your versioncontrol repository, but sorting that out only requires use of diff.

Closely related to this is that Python code is generally simple forpeople to modify and re-deploy. Modest Python scripts and tools arelikely to be only a single .py file, which you can edit and copy around,and even somewhat bigger ones are likely to just be a directory thatcan be copied. Deploying Go code requires not just the correct sourcecode but also a Go development environment and the knowledge of how tobuild Go programs from source. With Python, you can even try things outby just modifying the deployed version in place, then back-port youreventual changes to the official master copy in your version controlsystem.

(These days Go's support for modules makes all of this simpler thanit used to be, but there are still important considerations and somepotential complexities.)

Original Submission

Read more of this story at SoylentNews.

External Content
Source RSS or Atom Feed
Feed Location https://soylentnews.org/index.rss
Feed Title SoylentNews
Feed Link https://soylentnews.org/
Feed Copyright Copyright 2014, SoylentNews
Reply 0 comments