Programming Paradigms – What is the Precise Definition?

paradigmsterminology

Wikipedia defines programming paradigm thus:

a fundamental style of computer programming

which is echoed in the descriptive text of the tag on this site.

I find this a disappointing definition. Anyone who knows the words programming and paradigm could do about that well without knowing anything else about it. There are many styles of computer programming at many level of abstraction; within any given programming paradigm, multiple styles are possible. For example, Bob Martin says in Clean Code (13),

Consider this book a description of the Object Mentor School of Clean Code. The techniques and teachings within are the way that we practice our art. We are willing to claim that if you follow these teachings, you will enjoy the benefits that we have enjoyed, and you will learn to write code that is clean and professional. But don't make the mistake of thinking that we are somehow "right" in any absolute sense.

Thus Bob Martin is not claiming to have the correct style of Object-Oriented programming, even though he, if anyone, might have some claim to doing so. But even within his school of programming, we might have different styles of formatting the code (K&R, etc). There are many styles of programming at many levels.

So how can we define programming paradigm rigorously, to distinguish it from other categories of programming styles? Fundamental is somewhat helpful, but not specific. How can we define the phrase in a way that will communicate more than the separate meanings of each of the two words—in other words, how can we define it in a way that will provide additional meaning for someone who speaks English but isn't familiar with a variety of paradigms?

Best Answer

Thomas Kuhn defines paradigm in The Structure of Scientific Revolutions as:

Attempting to discover the source of that difference led me to recognize the role in scientific research of what I have since called “paradigms.” These I take to be universally recognized scientific achievements that for a time provide model problems and solutions to a community of practitioners.

Merriam-Webster offers three definitions1, the third one being the most relevant:

  1. example, pattern; especially: an outstandingly clear or typical example or archetype
  2. an example of a conjugation or declension showing a word in all its inflectional forms
  3. a philosophical and theoretical framework of a scientific school or discipline within which theories, laws, and generalizations and the experiments performed in support of them are formulated; broadly: a philosophical or theoretical framework of any kind

The term is quite commonly used and well understood in scientific environments, we don't need to further define it. A programming paradigm is simply a paradigm of the programming discipline, and that's about it.

The Wikipedia article you link to offers more of an explanation, perhaps targetted to people without a programming or other scientific background, than a definition. It's an encyclopaedia after all, not an authoritative software development reference.

1 Example is used prominently in the first two definitions, because paradigm (παράδειγμα) is the Greek word for it.