Beginners in programming language might think what is programming language? A pretty nerdy question, right? That is to say, you don’t have to be a nerd to understand what it is.
What is programming language
Well, programming language is simply a set of procedures and rules. These rules instruct a machine to perform specific tasks or to define algorithms to solve a predefined problem. These instructions specify what steps are to be executed to perform a particular task. For instance, we can code using a programming language to tell a computer or machine to solve a specific task as per our requirements. That is exactly what does a software developer do. If interested, we also have another article on history of programming languages.
All programming languages have two major components- syntax and semantics.
Syntax – Syntax refers to expected grammar and spelling form that computers can understand.
Semantics – Semantics are meanings of various elements in programming language. More specifically, they express associated meanings of different syntax.
Types of Programming Languages
Broadly, computer programming languages can be classified into two types. Low-level languages and High Level Languages
- Low-level Languages
These languages can interact directly with machine (computer processor / CPU). They are hard to read and normally they can only perform basic operations with their commands. For instance, Machine language that consists of 0’s and `’s only is an example of low-level language . They are hard to compute and are not human readable.
- High-level Languages
On the other hand, high-level languages have syntax that are made with natural language. This makes it easy for developers to better understand the syntax and semantics. These languages however, need interpreter or compiler to translate high-level languages into low-level native machine codes that the computer can understand.
Compiled code Versus interpreted code
Interpreter executes the program directly. Above all, it converts each statement like one line at a time into native machine code. It is because of this, it becomes a bit time consuming. Examples of interpreted languages are: PHP, Perl, Ruby and Python.
instead of each line being executed at a time into machine code and an executable file being created, compilers translates all code at one time. Some examples of compiled languages are: C, C++, Objective C, Java and C#. Object oriented programming is pretty popular now
Above all, it is pretty clear that we need either interpreter or compiler to convert high-level languages into low-level. But does this conversion require a compiler or an interpreter? Now that depends on which programming language we are using. Interpreted languages are more portable than compiled languages while compiled languages as performance boost as they execute faster. In today`s scenario, with improvements in processor speeds, the performance difference between two is insignificant.
To sum up, for beginners in programming language or learning it just for fun, you need to understand these basic underlining concept so that you know which type of programming language you are using. Also, no one can become a programmer in a day. It takes a lot of continuous effort, learning, debugging and patience along the run.