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>
   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
push message
call _printf
add esp, 4
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


C# Fundamentals - Lambda Expressions

Lambda Expressions - Introduction Lambda expressions are how anonymous functions are created. It's a very powerful syntactic sugar that is available in C#.
At syntax level,The lambda operator => divides a lambda expression into two parts. The left side is the input parameter and the right side is the lambda body.
 A lambda expression can be simply viewed as a function or method without name, which looks like method parameter(s) => method body, or method parameter(s) => method return value. The => operator is called lambda operator and reads “go to”.
 In order to get a grasp of how lambdas work we will go through some examples.
Simple Lambda Example using System; using System.Collections.Generic; using System.Linq; public static class BitShift { public static void Main() { List<int> list = new List<int>() { 10, 12, 13, 14, 15, 16 }; List<int> evenNumbers = list.FindAll(x => (x % 2) == 0); …

Pixelation Shader - Unity Shader

Pixelation Shader This is the correct way (one of many) of showing pixelation as a post-processing effect. This effect will work in any aspect ratio without any pixel size scaling issues as well as it is very minimal in terms of coding it up.

In order to get this to work 2 components have to be set up:
1) The pixelation image effect
2) The script - which will be attached to the camera

So let's get started by creating a new image effect shader.
We will take a look at our Shaderlab properties :
_MainTex("Texture", 2D) = "white" {} That's it, Everything else will be private and not shown in the editor.
Now we will see what are defined along with the _MainTex but are private.
sampler2D _MainTex; int _PixelDensity; float2 _AspectRatioMultiplier; We will pass _PixelDensity & _AspectRatioMultiplier values from script.
As this is an image effect there is no need to play around with the vertex shader.
Let's take a look at our fragment shader:
fixed4 frag (v2…

Visual Upgrade - Unity Asset Store [ July, 2018 ]

Visual Overhaul - Assets That Turn Mediocre Into Drool Worthy *Note: These assets are not arranged in any way, no comparison is done. They are just really cool assets that will help make your game look at least a bit better.😁 .

8.Pixel Arsenal- Pixel Arsenal is a bundle of 419 retro game FX. This includes missile, explosion, beam, flamethrower, powerup, fire and several other particle effects. Looks pretty neat.
7.Subsurface Scatter Shader - Many organic and some inorganic skins are not totally opaque right at the surface, so light does not just bounce off the top surface. Instead, some light also penetrates the skin surface, and scatters around inside, taking on the color of the insides and emerging back out to blend with the surface reflection. Tomatoes, fruits, wax, gels (like honey, or Jello) and so on all have subsurface scattering (SSS), and photo-realism really cannot be achieved without it.
6.Liquid Mesh FX - Liquid Mesh FX is a pack of liquid particle effects. U…