Skip to main content

Types Of Programming Languages

Well to understand the different types of programming languages we must first understand what a programming language is.

What is a programming language and why do we need it?

A programming language like any other language you and I speak, is a means to translate tasks or instructions to be performed from the user side to the computer side, say, you’re playing Super Mario on your computer, now you know that pressing your space bar forces Mario to jump, but your computer doesn’t understand that unless translated, it’s kind of like me saying “私はマリオです (watashi wa Mario desu)” to you, unless you know the language you have no clue as to what to make of the statement.
This is where our handy helper the programming language steps in, think of it like the google translate, you search for the statement on there to get an understandable answer in your native tongue. Similarly, the programming language is a vocabulary for you and your computer to understand one another, a dictionary if you must, it consists of a bunch of grammatical rules and instructions to be performed at certain points in a program by the developers, which in turn makes your life a tad bit easier. Can you imagine trying to type 1 0 0 0 0 0 (32 – ASCII Code for space bar) each time you want to jump in a Mario game?
So now that you have a fairly decent idea of what a programming language does for you, let’s move on to how it even came into being.

A brief look into the origin of programming languages

Around 90 years ago in a “not so friendly nation” a.k.a “Nazi Germany” lived a man named Konrad Zuse, he was particularly bright and gifted in his field of expertise, i.e., computers, back then computers weren’t the hand held devices you carried around, only a few fortunate people could even get to see a real working computer, let alone use it, mainly because it was a surprisingly costly affair to build one and not everyone knew how to use it or even needed a computer in their day to day life.

Now this curious man named Konrad was one of the few gifted people who actually understood the working of the computer, with a wealthy family to back his research Konrad had no trouble experimenting with the computer, now you should know that back then computers where specifically designed to do a single task and that single task alone, say multiplication, now you couldn’t get the computer to perform division no matter how bad you wanted it to. Then this man goes on to invent the world’s first programmable computer from his findings, changing the world one step at a time (First functional program-controlled computer – Z3 which was said to be turing complete).

Since it was the World War II going on back then and being a German, his works and publications largely went unnoticed in the United States and the United Kingdom, where in fact the brightest of minds lived and all the scientific discoveries acknowledged back then. Eventually the Nazi Government started providing him resources for his research, which you might have guessed, didn’t help his cause a lot either.
It was during this time that he came up with “Plankalkül (Plan Calculus)” the first ever high-level programming language based on a non-von Neumann concept. There you can see what a Von Neumann Architecture is.

It was only after the war that he got any recognition, which was in 1946 by IBM on one of his patents. Although when you search for the first programming language, you’ll first be directed to the world’s first commercially available programming language FORmula TRANslation or FORTRAN developed in 1956 at IBM, which was mainly because of Konrad’s Nazi relations which led to his inventions never getting the recognition it deserved.
Now I’m guessing you have a brief idea of how the concept of programming languages came into being,
well let’s move on to the types then.

Types of Programming Languages

Since the time of Konrad we have come a long way in terms of programming languages, now we have all kinds of programming languages for all specific and general purpose tasks.
If you’re fairly new to the programming world, the two major terms you might have heard would be:
Scripting Languages, and General Purpose Programming Languages.
Although there are plenty more types of programming languages like dataflow languages, data oriented languages, esoteric languages, extension languages etc. to name a few, we’ll be focusing more on the aforementioned two types.
Before we get in depth with those types you should know there are 3 basic levels of any programming language:
1. High-Level Languages: English-like languages which are fairly easy to understand and write but these are not understood by the computer. Eg: Scripting languages, Java etc.
#include <stdio.h>
main()
{
   printf(“Hello World”);
}
2. Assembly-Level Languages: There are like harder to type but easily understood by the computer, they use instructional commands to give a sense of one-to-one correspondence with the computer which often does not take place. Eg: Netwide Assemble (NASM)
global _main
extern _printf

section .text
_main:
push message
call _printf
add esp, 4
ret
message:
db ‘Hello, World!’, 10, 0
3. Machine-Level Languages: These are the codes that are machine dependent and understood by the computer. Eg: Binary code.

General Purpose Programming Languages

Now coming to general purpose programming languages, these are quite opposite to that of scripts,
although both aim to achieve the same result. These languages are usually used in codes that have a
broader sense of objectives to be performed. Programs written in these need to be explicitly compiled before execution.

Generally, compiled programs run faster than interpreted programs because they are first converted into native machine codes, since the compilers usually just compile the program just once, this does aid the cause.
Some of the prominent general purpose programming languages that you might have heard are C, C++, Java and Python.
Although Python is a general purpose programming language it is often confused as a scripting language as it can be run without the explicit compilation step, it can often act as both.

The line between a regular programming language and a scripting language is getting quite slim day by day as there are more powerful hardware and advanced optimizing techniques that allow the compilation to be so fast that you get almost the same results regardless of whether it was a script or a program.

Scripting Languages

Well the textbook definition for scripting is any high level programming language that supports scripts is a scripting language. Now what is a script? These are programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator.

In simple words a script is a piece of code that you can execute at will without having to be compiled
and are interpreted as such one command at a time, although you can compile them if you wish to. The whole purpose of scripting languages were to create functionalities to existing programs in a way such that it does not bloat the original program while doing so.

Although scripts are employed at large in the all fields of programming, they found their use much optimized in creating dynamic web pages, network interfaces in modems and terminals and game engines etc. Scripts are usually simple short codes that help increase the efficiency of the program when used in conjunction with regular programs even though scripts as such are slower than regular programs, they are also used to automate certain tasks in a program and extract information from a data set.
Some of the most widely used scripting languages are JavaScripts, VBScripts, PHP, Lua to name a few.
Unity uses C# as a scripting language. This is possible because of Mono.
Scripting an application usually exposes some of the internals of the low-level code in one way or another. Usually there are handles or object systems that are available to the scripting developer to consume. The developer of the binding will typically have to design the system to allow for the scripting language to consume it.

Game developers are some of the major users of scripting technologies, they develop the performance sensitive code in C, C++ or assembler and they take advantage of graphics-accelerated hardware, physics libraries, physics accelerated hardware and multi-cpu processing to increase the performance of a game but the interface to the end user will be a high level language like C# or JavaScript.

That's it! Hope you learnt something. Support Bitshift Programmer by leaving a like on Bitshift Programmer Facebook Page and be updated as soon as there is a new blog post.
If you have any questions that you might have about shaders / unity development / programming in general don't be shy and leave a message on my facebook page or down in the comments.
For Shader development tutorials, go : HERE
For Unity development tutorials, go : HERE

Assets Worth Checking Out

POPULAR POSTS

Tri-Planar Terrain Shader

How The Tri-Planar Terrain Shader Looks Like Apart from the manually drawn tile footpath the cliff walls and grass has been generated through a tri-planar shader. How The Tri-Planar Terrain Shader Works The shader that we make will work with the existing terrain system and no need for any custom scripts.
The first two textures provided in the terrain settings will be used to texture the terrain :
*Notes:-
First Texture Index:- Texture that appears on cliff sides.Second Texture Index:- Texture that appears on flat surfaces.Any subsequent textures can be used to draw on top of this as usual.Drawing with either first or second texture slot acts as a eraser removing subsequent textures Terrain Shader Tutorial The shader we will make will be working on top the existing terrain shader that Unity provides us.  So that will require accessing the Unity shader repository for your specific version of Unity.
The version of Unity I used to create the shader is version 2017.4.
Most likely there won&…

Access Reflection Probe Data For Custom Shaders

The Unity shader documentation regarding reflection probes is pretty minimal and not at all comprehensive.
This short tutorial is intended to bring reflection probe functionalities to the forefront your future shader writing endevors which is a fancy way of saying "Look at this cool stuff and go and use it somewhere" 😏
Here we will try just the bare minimum of making a shader that reflects the cubemap data from reflection probe and displays it on the object.

These reflection probes are basically objects that store a complete image of the environment surrounding it into a cubemap which then can be read by shaders to create various effects.
More information on how reflection probes work in Unity can be found here :
Using Reflection Probes In Unity

I am not going over how to set up Reflection Probes here only how to access them inside our custom shaders.
So this is what we will be making:
The reflection probe takes in the cubemap only if it is within it's range otherwise i…

Introduction To Regular Expressions [ Regex ]

What Is A Regular ExpressionRegular expression or regex for short is a sequence of characters that defines a search pattern.
Let me simplify this for you.
Imagine you're writing a huge assignment or a report then you realize you misspelled a word and apparently the word was used a couple of hundred times throughout your document, now any sane person living in the 21st century would :
find and replace->”misspelled word”->”correct word”.

Have you ever wondered how the computer checks for the word?
How the words are magically found and replaced?
It just searches the entire document for “word-to-be-searched” and replace the string with the new one.
Imagine this scenario, you are asked to redact phone numbers from a letter, now you don’t know any of the numbers personally, and since the letter contains plenty of numbers that are not just phone numbers and those should not be redacted what would you do then? This is where Regular Expressions come in to play, a regular expression is bas…

Fortnite Procedural Construction Animation Shader

Fortnite Construction Shader This shader is loosely based on the one that was presented by the Fortnite developers in their GDC talk: Inner Working Of Fortnite's Shader-Based Procedural Animations.

 Here is what we will end up with:
This technique requires you to author the 3D model in a certain way, More or less how those Fortnite developers did.
So we need the authored 3D model and the shader that uses data we get from the model to achieve the desired effect.

There are some nuances here and there so make sure you don't miss out on the details.😗
The first step will be preparing the 3D model and putting in the required data. I used Blender 2.79 but any 3D modeling software would do.
3D Model PreparationModel It
Apply Vertex Colors: For the direction of flight
Each color is a component of a vector (x, y, z). This will be considered as local space.
Values range from -1.0 to +1.0 for each component.
Negative values are achieved by using values of less than 0.5 and positive values wi…

Gift Wrapping Convex Hull Algorithm With Unity Implementation

Convex Hull Algorithm Convex Hull algorithms are one of those algorithms that keep popping up from time to time in seemingly unrelated fields from big data to image processing to collision detection in physics engines, It seems to be all over the place. Why should you care? Cus you can do magic with it and it seems so simple to implement when you first hear about it, but when you start thinking about it, you will realize why it's not such a straightforward thing to do.
Now that I got you interested (hopefully) and now we will see just what a convex hull is.
As you may have noticed a perimeter was made with the same points that was given and these perimeter points enclose the entire set of points.
Now we have to clear up the term 'Convex'.
Convex means no part of the object is caved inwards or that none of the internal angles made by the points exceed 180 degrees.
In this example of a concave shape internal angles go beyond 180 degrees.
What are those red lines for? Well...…