Classifying Coding Langs.
=Today's post...is basically explained by the title. Yes, today, we'll compare and classify a few famous programming languages by criteria.
Let us begin.
Introduction : Classifying Languages.
There are a million different ways to classify programming languages(I mean, technically, whether the founder of the language had a 'girlfriend' is technically a classification condition...), but we'll look at the 3 most widely used classifications when explaining programming languages.
I. Paradigm.
What is a paradigm? Basically it is the 'style' of the language, like using functions, capsulation, etc.
i) Functional Programming.
Functional programming basically means the functions in the program = pure functions, which don't generate side effects.
Side note : what are 'side effects'?
c = 0
def func(a, b):
return a+b+c
a = 0
b = 1
print(func(a, b))
c = 3
print(func(a, b))
# Output : 1, 4
If we take a look at the code above, calling the same function with the same parameters doesn't generate a same output, due to a global value c changing. For a pure function, a function must have the same output for the same input. A famous example is mathematical functions.
Back to the talk, what are the advantages of function programming? The biggest advantage is that it's easy to debug. If side effects happen, that also means that there's more that we have to consider during coding.
Some examples of functional programming include Haskel and Lisp.
ii) OOP(Object-Oriented Programming).
OOP goes crazy for capsulation. Basic components are grouped into objects, which are again used to create more advanced ones. They are really easy to expand, but are really hard to design in the first place. Some examples are C++, Python, and Java.
iii) Procedural Programming.
The simple one. Just follow the code. Since there's no twist, the code itself is very intuitive, and easy to understand. However, it gets harder to take care of as the length of the code increases. Some examples include C and Pascal.
II. Compile Method.
This is a famous one. There are two major compiling methods. Let's explore them.
i) Compiled.
In this case, the code is compiled before the program is actually run. Basically, the code(written in the 'code' we know) is translated into a lower level code, which is machine code in most cases. This drastically reduces time taken for a program to give a result. Some examples include C++ / C.
ii) Interpreted.
For interpreted coding languages, the code is interpreted during the program execution. This makes the code a bit slower during execution, but decreases overall developing time since no lengthy compiling process is required. Python and Javascript are famous interpreted languages.
III. Types.
For C/C++ users, types may seem like something too natural. However, it is not. Python is infamous for begin able to mush up types, and Javascript is also quite famous for this. Just look at this meme :

I won't divide this part into subgroups(since it's literally a Yes/No question), but talk about their pros and cons. A non-type structure allows 'flexible' coding, but has a lot of margin for error. A type structure language allows for errorless coding, but it is a bit excruciating during the actual programming experience. A famous comparison is between Javascript and Typescript. They are basically the same thing, but, as the name suggests, Typescript has types.
Conclusion.
In the end, programming languages ARE weird. Each follow the goal and design their original founders selected, and they also might get changed as time passes.
Whatever you do, just keep one thing in mind.
.
.
.
.
.
.
.
It's better than PHP.
