Programming Languages: Differences
When you start looking into programming you will find a million (Actually around 700 as of 2020, [1]) different languages to choose from. Going back all the way to the 1940s with the official first programming language
Plankalkül (which was developed but not implemented until the 90s), into the 50s and 60s with languages like COBOL and LISP which are still used today [2].
Languages are for the most part classified into programming paradigms based on their features, however; languages can also be classified into multiple paradigms [3].
As of 2020, the 10 most popular languages among developers follow the object-oriented, functional, or a combination of paradigms [4].
These are the principles of the two most popular paradigms.
Object-Oriented Programming
Abstraction: Abstraction is the process of hiding the internal details of an application from the outer world. [Understanding Abstraction]
Encapsulation: The process of combining elements to create a new entity. It also hides data implementation and restricts access to reduce complexity [Understanding Encapsulation].
Inheritance: A feature that represents the "is a" relationship between different classes. It enables new objects to take on the properties of existing objects [Understanding Inheritance].
Polymorphism: A programming language's ability to process objects differently depending on their data type or class. [Understanding Polymorphism]
Functional Programming
Pure functions: Don’t have side effects or actions that do not relate to the output of the function.
Immutability: Not directly modifying data, this leads to predictability. You know the value of the data and they are not changing.
First-class functions: Functions can be used as any other value. Functions can be passed as arguments to other functions and store them in variables.
Higher-order functions: Functions operate with other functions. A higher order function take a function as an argument or returns a functions.
Function composition: Create multiple simple functions in order to create a more complex one. The result of each function is passed as the argument of the next, and the result of the last one is the result of the whole.
Every developer has his/her favorite programming language based on the business requirements or experience. No matter what language you choose, often times the principles overlap. One might need to use multiple languages to build a whole application.
Don’t get overwhelmed about knowing every single language, pick one with good community support and expand on your skills as you go. It is exciting times to be a developer.
[1] https://en.wikipedia.org/wiki/List_of_programming_languages
[2] https://www.computerhope.com/issues/ch001621.htm
[3] https://en.wikipedia.org/wiki/Programming_paradigm
[4] https://insights.stackoverflow.com/survey/2019#most-popular-technologies