|
|
|
|
|
by belorn
3297 days ago
|
|
The C example has three includes, two conditionals, two loops, and one function definition. The python example has a single include, conditional, and loop. For readability purpose it is easier to go through each lines of the python program than the OpenBSD C code. Its not massively different, but its distinguishable enough that I would choose the python version if I wanted to maximize readability, minimize syntax requirement and did not want to use shell script. The Shell function is in my view the superior choice if the audience is a programmer than know the shell script syntax. It is just a single loop and is written in the environment that the program is intended to be used in. The only drawback there is the speed. |
|