Programming Languages and Paradigms

Operating Systems and Programming Languages

Modern Operating Interfaces

  • The evolution of operating systems includes both graphical and command line interfaces.

Types of Structured Programming

  1. Procedural Programming
  2. Object-oriented Programming
  3. Model-based Programming
  4. Service-oriented/Microservices
  5. Functional Programming

Reasons for Studying Programming Concepts

  1. Increased ability to express ideas clearly.
  2. Improved background for choosing appropriate programming languages.
  3. Better utilization of languages that are well-designed.
  4. Overall advancement in computing technology.

Applications of Programming Domains

  1. Scientific Applications
  2. Data Processing
  3. Text Processing
  4. Artificial Intelligence (AI) Applications
  5. System Program Applications

Classification by Programming Paradigms

  1. Procedural-Oriented Paradigm
  2. Object-Oriented Paradigm
  3. Functional Programming
  4. Imperative Programming
  5. Non-deterministic Paradigms
  6. Logic Programming

Structured vs. Unstructured Programming

Structured Programming

  • Defined as a subset of procedural programming.
  • Easier to learn and follow.
  • Advantages include:
    • Reduced complexity.
    • Facilitates debugging.

Unstructured Programming

  • Essentially a form of procedural programming.
  • More difficult to learn and follow.
  • Advantages include:
    • Speed of execution.
    • Often leads to production of readable code.
  • Code Duplication:
    • Not allowed in structured programming.
    • Allowed in unstructured programming, leading to potential maintenance issues.

Programming Language Fundamentals

Definition of Programming Language

  • A programming language is a design used to communicate instructions to a computer.

Syntax

  • Defined as the arrangement rules for programming structures to be meaningful and correctly translated to machine code.
  • Syntax is usually defined using a combination of regular expressions and Backus-Naur Form (BNF).

Semantics

  • Refers to the meaning of a language as opposed to its form (syntax).

Classification of Programming Languages

  1. Machine Language / Low-Level Language
  2. Assembly Language
  3. High-Level Language

Traits of Good Programming Languages

  • Clarity: Programs should be easy to read and understand.
  • Orthogonality: Operators should be able to combine in many ways without unexpected results.
  • Locality: Related operations should be close to one another.
  • Support for Abstraction: Programs should allow for abstract thought processes.
  • Compactness: Code should not be unnecessarily large.
  • Naturalness: The language should feel intuitive to programmers.
  • Efficiency: Programs should run efficiently in terms of both speed and resource utilization.

Components of Programming Languages

  1. Variables: Names used to store data.
  2. Syntax: The structure of statements that the language follows.
  3. Control Structures: Constructs that control the flow of a program (e.g., loops, conditionals).
  4. Data Structures: Formats for organizing data (e.g., arrays, strings).
  5. Data Types: Categories of data (including):
    • Primitive Data Types: Basic types provided by a programming language.
    • Non-Primitive Data Types: Types that are built from primitive types (e.g., arrays, records).
  6. Tools: Software used for programming including compilers, debuggers, and IDEs (Integrated Development Environments).