In this article, an attempt is made to explain and summarize the concepts of programming languages and programming in general from my experience as a computer science student, a competitive programmer, and a back-end web developer. I will try to explain the theoretical concepts that I learned during my experience. As I mentioned, I do not call myself an expert in this field because I believe that expertise in programming languages is very hard to achieve. I am just trying to simplify some hard concepts as I understood them from literature.
Computational Models of Programming Languages Paradigms
So, before we start talking about the purposes of having a large number of programming languages, we should classify the different programming languages. They can be classified into 3 main types: Imperative/Procedural, Functional, Declarative or logical. In the first type, imperative or procedural languages are all the language that follow a set of given steps (procedures). We can talk about C, Python, Ruby, C++, Java… and the majority of languages that we are using today. For the second type, functional languages like Haskell and Lisp do not have variables everything in these languages is a function. So, it is a new way of seeing programming. Finally, the declarative or logical programming languages such as Prolog when we declare a set of rules and a platform in which we can apply them. For example, we give to the program the rules of sudoku and a sudoku board, and it will take care of the different solutions that it can generate. This type of languages is used a lot in Artificial Intelligence.
Program Organization Models in Programming Languages
This point is different from the computational models because they care just about how to solve things in a computational manner. For program organization models, they are more into how your code is organized, and how they use memory to represent variables. The first type that we can talk about is the abstract data types model or ADT, it considers the abstract data type as a unit in itself like CLU language by MIT. Second, the module based model which considers modules as a main part of programs such as Modula-2. Each program is divided into a set of modules. Modules can be defined as groups of types, variables, procedures and functions. Third, the object oriented model which is the famous one. Many languages use it such as Java, Python, C++, and Ruby… It considers everything as an object which has attributes and behaviors. Finally, generic model which defined generic modules to be instantiated at compile or runtime in order to create the data structures, function and procedures needed. It can intersect with OOP or functional or with multiple paradigms.
Different Purposes of Programming Languages
Concepts of Programming Languages by Sebesta
Image Credits: http://4.bp.blogspot.com/-HHrtTbA5M8Q/U2aeVX_RHsI/AAAAAAAAAJE/MrwzOTJVGoI/s1600/Download+free+81+ebooks+on+c+c+++c%23.png