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

POPULAR POSTS

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…

Advanced Billboard Shader + World-Space UI Support

Advanced Billboard Shader + World-Space UI SupportAs you know billboarding is basically a plane with a texture on it that always facing the camera.These are some examples of what we are going for. This tutorial is going to be pretty straight-forward and easy to follow along you will learn how to make a billboard shader that not only keeps looking at the camera but also keeps its relative scaling intact.We will also provide an option to keep it rendered on top of all the other objects in the scene. This will be most useful for world-space UI that needs to be rendered on top of other geometry.We will be making 2 shaders here,Modified Default Unlit shader :- This one is a general shader ( easy to modify furthur ).Modified Default UI shader :- This one supports whatever a UI shader supports along with our billboarding capabilities. So let's get started with making the first one. As usual create a new Unlit shader and dive into the properties we need.Properties { _MainTex ("Texture…

Get Started With Compute Shaders

Getting Started With Compute Shaders The shader that's a 'Jack of all trades'. Of course, it's the Compute Shader.
These beauties allow your general purpose parallelized code to run on the GPU.
These can be used to do some pretty cool stuff that would be pretty difficult to do otherwise even with multi-threaded CPU code.
When bringing up Compute shaders in the context of video games, It's mostly used in physics simulations and freaky looking particle effects and to a lower extent as a core part of some post-processing effects and render pipeline optimizations such as various culling operations like occlusion culling.

The most important thing about compute shaders is that it allows for more efficient communication from CPU to GPU side and vice-versa. That basically means you can send arbitrary data to the GPU, let it do some work and then read it's output and then do whatever you want with it.
You can now see that how different compute shaders are when compared …