History of Programming Paradigm
Disclaimer : The content of this blog are my views, observations and understanding about the topic. I do not intend to undermine anything, I am simply giving my perspective about it. This will help you to look at the topic from a different angle.
Languages have evolved based on need of the market or problems which we are trying to solve. Selecting a proper language is important for a particular problem statement, be it Java, C, Scala, Groovy etc. Each language has its importance! Languages are grouped at top level by programming paradigms which are Procedural, Object Oriented and Functional.
The paradigm shift is driven by the industry needs. During industrialization there was a need of fast manufacturing to satisfy the demands. Human beings cannot work 24/7, and there are laws of wages, insurance, etc. Hence, companies wanting to automate manufacturing. The manufacturing process automation was done using procedural languages. In those days, procedural languages were popular like C. In process automation, whatever the manual process is, needs to be automated.
Next, the complexities increased and there was a need to write software in a more modular way. Humans understand things by differentiation and categorization. Naming things is taught to us since childhood! Solving complex problems need a divide and conquer approach. To solve any problem we need to first understand it.
For example, we need to create a store locator to the nearby open stores based on my location, and contains the product I urgently want. In team meetings we discuss about store, customer, product etc. We understand the requirement and define an algorithm. The important part is to write code so that we can map our understanding as is. In huge projects or in maintenance stage, if we look at the code we developed a year later, it appears alien to us. For quickly understanding the algorithm, the code should be able to reflect the store, product and customer entities and their behaviors, so that we can correlate easily. In this Object Oriented paradigm, object oriented languages like JAVA, C++ are helpful.
Software is everywhere in collecting data & processing, then sending it to the customer. Just like the store locator we discussed. Companies then thought what they could sell to customers and how can they give them a more personalized experience. Data insights will help us in this.
Understanding the huge data is delegated to machines again, which most of the aspects of machine learning is based on mathematics. For example, during daily commute from home-to-office, start-time and time-on- destination is recorded, along with the route taken. We need to suggest to the customer probable time to office based on road traffic. All of these things require data analysis, curve fitting and correlation techniques of mathematics. In this case we get the solution in terms of mathematical formula. In mathematics, complex formulas are based on basic formulas. Hence, this mapping can best be done in a functional way.
Mathematical formulas are like functions; once defined and given the same data again and again, the output should be the same. Ex : c^2 = a^2 + b^2 (Pythagoras theorem). If I write a functional code which takes ‘a’ and ‘b’ as argument and returns ‘c’. I run with values of ‘a’ = 3 and ‘b’ = 4 then it should always return ‘c’ = 25. Which is why Scala is popular in today’s market, influenced by Functional paradigm languages.
This shift is continuous and we need to understand that all languages have their defined use cases, pros and cons. Consequently, right choice of language is necessary for the problem you are trying to solve.
My Thoughts
With due respect to other programming languages, I personally like JAVA which is declarative and my code speaks for itself. Although, I tend to learn other languages so that I can be in a position to choose which language is best suited for my current problem. I believe in language unification for creating the best software since each responsibility should be delegated to correct language. We should design a software which is hybrid, like object modeling. Business logic should be in object oriented languages, data processing rules and logic in functional language, and process automation in procedural language.