Programming Languages

Programming Languages:

A computer program can be termed as a sequence of instructions that computers can interpret and execute to perform a well-defined task. To perform this task, a programming language is required as computers do not understand human languages (like English). A programming language consists of a set of characters, symbols, and usage rules that allow users to communicate with computers just as human languages. Human languages are not used to instruct computers because these languages are ambiguous, vaguely structured, and consist of vast ever-changing vocabularies. Computer languages have relatively few defined rules for the composition of programs and strictly controlled vocabularies in which unknown words must be defined before they are used.

A programming language is a formal language that includes a set of syntactic and semantic rules to write computer programs so that the computer can yield the desired results. Many programming languages have been developed over the years which can be categorized into various generations based on their interaction with computers.

First Generation Languages (1GLs):

We know that computers can do a variety of jobs; they can process numeric as well as non-numeric data very efficiently. But the computer doesn’t understand directly this data. To process this data it has to be converted into binary code. This set of instruction codes, which can be directly understood by the CPU of a computer without the help of a translating program is called “Machine Language“. Thus, machine language is the fundamental language of a computer. The instructions of machine language have two parts:

  • Operation code.
  • Operand.

Operation codes sometimes called “Opcodes“, tells the computer what the instruction will perform, The other part (i.e. operand) is the address of memory location where the data or instruction are to be found or where the results are to be put.

The execution of machine language is very fast. It is the fastest of all the languages. Machine language has more disadvantages than its advantages. Machine language is hardware-dependent language and varies from hardware to hardware. That means each computer manufacturer has its own code in binary form. These programmers should have extensive knowledge of hardware before the programming. Also debugging in machine language is very difficult. In other words, we can say that machine language is difficult to learn for programmers but easy to understand by computers.

It is generally used for complex applications such as space control systems, nuclear reactors, and chemical processing.

Second Generation Languages (2GLs):

Because the first generation languages were regarded as very user-unfriendly people set out to look for something else, faster and easier to understand. The result was the birth of second generation languages, also known as the assembly language or the symbolic language, which was introduced in the early 1950s.

These generations made use of symbols and are called assemblers.

An assembler is a program that translates symbolic instructions to processor instructions. But deep in the 1950s, there was still not a single processor but a whole assembly rack with umpteen tubes and or relays.

A programmer no longer has to work with one’s and zero’s when using an assembly language. He or she can use symbols instead. These symbols are called mnemonics because of the mnemonic character these symbols had (STO = store). Each mnemonic stands for one single machine instruction. But an assembler still works on a very low level with the machine. For each processor, a different assembler was written.

Assembly languages offer several advantages:

  • They are more standardized and easier to use than machine languages.
  • They operate very efficiently, although not as efficiently as machine languages.
  • They are easier to debug.

However, there are still some disadvantages:

  • Assembly language programs are usually very long and difficult to debug.
  • Though less abstract than machine languages, assembly language programs are still complex.
  • Though more standardized than machine languages, assembly languages are still machine dependent.

Third Generation Languages (3GLs):

The third generation language, also known as the high-level language, was introduced in the late 1950s to overcome the limitations of both the machine language and assembly language. The high-level language enables users to efficiently utilize the benefits of computers and write programs independent of a particular type of computer. This implies that programs once written can be easily executed on another computer.

High-level languages are also known as procedure-oriented languages because these languages define all the steps in a specific order to execute a particular task. These languages are more near to human languages and every language has its own syntactic and semantic rules.

High-level languages are not understandable to computers directly hence, a compiler or an interpreter is required to translate the high-level language into the machine language. Note that every high-level language has its own compiler or interpreter.

Compiler- execute later. A compiler is a language translator that converts the entire program of a high-level language into machine language before the computer executes the program. The object code can be saved and thus can be executed later (as many times as desired), rather than run right away. Examples of procedural languages using compilers are COBOL, FORTRAN, Pascal, and C.

Interpreter- execute immediately. An interpreter is a language translator that converts each procedural language statement into machine language and executes it immediately, statement by statement. In contrast to the compiler, no object code is saved. Therefore, interpreted code generally runs slower than compiled code. However, code can be tested line by line. The BASIC language uses an interpreter.

Procedural languages have many advantages over machine and assembly languages:

  • The program statements resemble the English language and hence are easier to work with.
  • Because of their English-like nature, less time is required to develop a program for a given problem.
  • Once coded, programs are easier to understand and modify.
  • The procedural languages are machine-independent.

However, procedure-oriented languages still have some disadvantages compared to machine and assembly languages:

  • Programs are executed more slowly.
  • The languages use computer resources less efficiently.
LanguageFeatures
AdaAda was developed by Jean Ichbiah in the 1970s for structured programming and is commonly used in embedded and real-time systems.
BASICBeginner’s All-purpose Symbolic Instruction Code was developed by John Kemeny and Thomas Kurtz in the1960s as a teaching tool for beginners to learn.
COBOLCommon Business Oriented Language was developed in the 1960s to be widely used for mini and mainframe programming. This language was suitable for writing programs that process large files and generate reports.
FORTRANFORmula TRANslation was developed by IBM-company in the 1950s for scientific computing and numerical analysis.
CC was developed by Dennis Ritchie in the early 1970s for writing the UNIX operating system. C is also known as the middle-level language because of its closeness to low-level languages.
C++C++ was developed by Bjarne Stroustrup at Bell Labs in the 1980s for creating the system software as well as the application software. It is based on the C language with an additional feature of object-oriented programming.
JavaJava was developed by James Gosling and other engineers at Sun Microsystems in the 1990s for creating consumer electronic devices. It is a platform-independent language that runs programs on diverse hardware platforms.
Visual BasicVisual Basic (VB) was developed by Microsoft Corporation in the 1990s for creating application software.
C#C#, pronounced as “see sharp”, was developed by Microsoft Corporation as a part of their .NET initiative.
Visual C++Visual C++, commonly known as VC++, was developed by Microsft. This language has the object-oriented feature of C++. Visual C++ is GUI and provides a development environment for disk operating systems and Windows.

Fourth Generation Languages (4GLs):

Very high-level or non-procedural or problem-oriented languages, also called fourth-generation languages, are much more user-oriented and allow users to develop programs with fewer commands compared with procedural languages, although they require more computing power. These languages are known as problem-oriented because they are designed to solve specific problems, whereas procedural languages are more general-purpose languages.

Three types of problem-oriented languages are report generators, query languages, and application generators.

  • Query Languages- It filters data according to the condition given. Users make query from database to retrieve information. Examples of query languages are SQL (Structured Query Language), Prolog, and Intellect.
  • Report Generators- It makes reports using data stored in a database. These are similar to query languages and display the output as a report.
  • Application Generators- An application generator is a programmer’s tool consisting of modules that have been preprogrammed to accomplish various tasks. The benefit is that the programmer can generate applications programs from descriptions of the problem rather than by traditional programming, in which he,/she has to specify how the data should be processed.

Fifth Generation Languages (5GLs):

The fifth generation defines the future trends in programming languages. Computers will be able to understand and process instructions using common or human languages. There will be hardly a need to learn the syntax of a particular language. Scientists are still in the progressing phase with the development of applications such as voice recognition, artificial intelligence, expert systems and so on which will be based on fifth-generation languages. These are some of the characteristics that will be available in the fifth generation language.

  • Easy to code.
  • Easy to debug.
  • Easy to understand.
  • Machine independent.

Create Database in SQL
Computer Network
Read More About Programming language– Wikipedia

Add a Comment

Your email address will not be published. Required fields are marked *