Member-only story

Dynamic Languages vs Static Languages (round two)

Vassilios Karakoidas
2 min readAug 20, 2023

--

Recently, I was looking (don’t ask why, maybe I will tell you in the future, if I ever get the time and focus) at Docker Engine SDKs, searching if you could start/stop containers programmatically.

It seems that you can, and in a variety of languages, like golang, python or via a REST API.

The first example to just run a simple command within a container image, was in Golang.

It is straightforward, you get the client instance, you pull the image, you start the container and finally you wait and print out the container logs. Really nice, huh? With a few lines of code, you have all this power; at your fingertips.

I was then ecstatic when I saw that the second example was in Python. Cool, let’s see this one too:

What!? It’s only three lines! Three!

So, what’s going on? Why there is so much difference in lines of code, when trying to write such a program.

From the example, it seems that Golang engineer excel at error handle (and spreading panic as well :)). But I think that deep down it is a matter of mentality. Somehow, I believe that the manual…

--

--

Vassilios Karakoidas
Vassilios Karakoidas

Written by Vassilios Karakoidas

Software Engineer, Software Architect, Gamer and Researcher. Opinions are my own.

No responses yet