I was recently translating a very old piece of code written in the ’80s in FORTRAN77 to Matlab. This process has taken me 3 weeks for 20 line code!
Partly because probably I am not a skilled programmer and partly because statements like GOTO do not exist in Matlab.
My aim was to work out exactly the efficiency of a numerical algorithm so I needed to know exactly the value of each variable at every loop counter etc. so the code had to be transcribed exactly. No fancy coding skills to improve the “code” were to be invoked.
In this exercise I realised that programming is more an art form than anything else. There is a beautiful flow of logic (actual mathematical algorithm) that has to be channeled (dictated by the language constructs, data structures and commands) into a specific form (much like a canal I suppose).
Each time we choose a different language, expressing the same algorithm can take a very different form. Interestingly the language itself can impose either an improvement or a the opposite. In some ways the language can function like the clothes we force our bodies into- giving a specific shape.
In some cases its bit a like struggling to find a word in a language where it doesn’t exist to express a sentiment that we have a word for in another language.
I wonder if anyone has studied how programming language constraints influence actual logic/algorithms?
Or is this simply my own lack of expertise leading me to fanciful thoughts?