Programming Languages

Basics of Programming Languages

  • A programming language is a special language used by programmers to develop software programs, scripts, or other set of instructions for computers to execute.

  • Programming languages have a unique set of syntax and semantics that dictates how the programs written in them should be structured and behave.

  • The two broad categories of programming languages are low-level languages and high-level languages.

Low-Level Languages

  • Low-level languages are closer to the hardware and are not easy to read or write, as they often incorporate binary code and location-specific memory addresses.

  • Examples of low-level languages include Assembly Language and Machine Language.

  • While challenging to understand, low-level languages offer a high degree of control over system resources.

High-Level Languages

  • High-level languages are easier to read and write, as they are designed to be closer to natural languages.

  • Examples of high-level languages include Python, Java, C++ and JavaScript.

  • Unlike low-level languages, high-level languages are less detailed about the hardware data, focusing more on algorithms and data structures.

Interpreted and Compiled Languages

  • Programming languages can also be classified as either interpreted or compiled, depending on how their code is executed.

  • In interpreted languages, the code is executed line by line by an interpreter at runtime. These languages are easy to debug and include Python and JavaScript.

  • In compiled languages, the entire code is converted into machine code before it is run. These languages typically offer better performance and include C and C++.

Object-Oriented Programming

  • Object-oriented programming (OOP) is a paradigm where software is structured around ‘objects’, which can be manipulations of real-world entities.

  • Key elements of OOP include encapsulation, inheritance, polymorphism, and abstraction.

Procedural and Functional Programming

  • Procedural programming is a paradigm that structures software around procedures or routines. It involves dividing programs into small parts that can be reused across different programs.

  • Functional programming is a paradigm that models software as a series of mathematical functions with no changing state. It promotes code simplicity and readability.