Programming Language and Its Types

what is a programming language and its type

hello world program in PHP

Topic:

after reading the article you will know this stuff

  • what is program
  • what is a programming language in simple words?
  • what are the types of programming languages?
  • how computers really think
  • difference between interpreter and compiler
  • examples of programming languages
  • use of programming languages

what is program

a set of instructions given to a computer to perform a specific task is known as a program.

programming language definition:

A set of grammatical rules to write a computer program is known as the programming language. Different programming languages have different syntax to write a program.

The structure of programming languages are defined by some rules and those rules are known as syntax in programming languages.

Main types of programming languages:

Some languages are nearer to human languages and some are nearer to machines than humans. so, basically, there are only two main types of programming languages. the two main types of programming languages are

  1. low-level language
  2. high-level language

low-level languages:

those languages that are nearer to machine code and far from human languages are usually known as low-level languages. it is clear that the computer does not understand our language English or any other human language.

how computers really think

there are many and many small switches on the computer. each switch can be off or on at a time. when a switch is on we call it 1 and when the switch is off we call it 0. by putting a lot of them together we got options. Those options are useful like they can be letters, numbers, symbols, etc.

there are only two low-level programming languages

  • Machine language
  • Assembly language

Machine language:

machine language is the combination of bits(os and 1s). it directly runs on the CPU. While other languages need a translator program in order to make them machine-understandable.

it is really hard to learn machine language.

Assembly language:

assembly language is a step ahead of machine language. As it uses strings, numbers, and compressed sentences (abbreviations or phrases). you can call it a bridge between machine language and high-level languages. an assembler is used to translate assembly language into machine language.

assembler:

An assembler is a program used to translate assembly language into machine language.

High-level languages:

high-level languages are nearer to human languages. CPU really does not understand high-level languages. An interpreter or a compiler is used to translate high-level languages into machine language. So, that machine understands the program and runs it.

Difference between Interpreter and Compiler:

Interpreter:

An interpreter is a program that converts statement of programming languages into machine language one by one during the program run.

Compiler:

Compiler converts the whole program into machine language at once before the program run.

Examples of High-level languages:

C, C++, C#, python, PHP, Java, Javascript, Pascal, Basic, Ruby, etc

The paradigm of programming languages:

  • Procedural programming language
  • logic programming language
  • Object-oriented programming language
  • functional programming language

Procedural programming language:

To compose a program procedural programming languages use procedures and well-structured steps according to the syntax of the programming language. This programming paradigm is derived from imperative programming.

The programming task is breakdown into the collection of variables, data structure, and subroutines.

Procedural programming language examples:

Fortran, COBOL, BASIC, Pascal, C, etc

Logic programming language:

logical programmings are in logical form. They express facts and rules about the program. Rules written in logic programming languages are written in the form of clauses.

Logic programming language examples:

Planner, Prolog, Datalog, etc

Object-oriented programming language:

object-oriented programming is based on the concept of objects.

An object can be a method, variable, data structure, or function in computer science. but in this paradigm, it can be a combination of variable, function, and data structure.

Object-oriented programming language examples:

Java, C++, C#, Python, R, Javascript, Ruby, Perl, etc

Functional programming language:

in this paradigm, expressions are used instead of statements. Programs are constructed here by applying functions and composing functions. here functions can be returned from other functions, can be bound to names, and passed by arguments.

Functional programming language examples:

CL, Haskell, Ocaml, f#, etc

scripting programming language:

scripting languages are programming languages. they interpreted at run time rather than compiling. script language is used for a run time environment that automates the act on the instructions of a computer program.

scripting programming language examples:

Bash, Powershell, Kotlin, Tcl, etc

Use of programming languages:

programming languages are used to create both system and application software. All the websites we run on the internet and play games on our PC, laptops, or even on play stations. they are all made by programming languages.

Programming language photo

Conclusion:

In this article, I have written just basic concepts and have tried to be just simple so everyone can understand them. you have learned the basics of programming languages in this article.

Did you learn something new here? please tell us by commenting.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store