The Rev Dodgson said:
Being a self-taught programmer (apart from some uni classes back in the days when Fortran IV was the latest and greatest), I’m pretty hazy on what terms like “object oriented” or “functional programming” really mean, but I found the article linked below both interesting and useful:
Functional programming is finally going mainstream
> Unlike object-oriented programming, where data structures and logic are entwined, functional programming emphasizes a separation of data and logic.
OK.
Think of a language. It contains nouns and verbs, adjectives and adverbs. In programming, I always program verbs, procedures. And this is how the first computer programs were written. The programs in “numerical recipes” are verbs. They actually do things.
Then object orientated programming came around. It works noun by noun, totally ignoring verbs. I never took to it.
I shocked an object oriented programmer once. My subroutine contained only three lines. I had to explain to him that the three lines were “read data”, “operate on it”, “write it”. His jaw dropped open, “Is that all that’s needed!”. He was used to writing a module to set up a data structure, then to define another module to map the specific data onto that data structure, etc.