Programming Languages Summary

Programming Languages Overview

Domains of Programming Languages

  • Scientific Applications:
    • Focus on floating-point computations and arrays.
    • Example: Fortran.
  • Business Applications:
    • Focus on reports, decimal numbers, and characters.
    • Example: COBOL.
  • Artificial Intelligence:
    • Focus on symbols and linked lists.
    • Example: LISP.
  • Systems Programming:
    • Focus on efficiency.
    • Example: C.
  • Web Software:
    • Uses a mix of languages (HTML, PHP, Java).

Language Categories by Use

  • Machine Languages:
    • Hardware-implemented languages using processor instructions.
    • Machine code is in hexadecimal.
  • Assembly Languages:
    • Machine codes wrapped with alphanumeric symbols for readability.
    • Includes labeled storage, jump targets, and subroutine addresses.
  • High-Level Languages:
    • Machine-independent and similar to natural language.
    • Features: variables, types, subroutines, complex expressions (e.g., 2 * (y^5) >= 88 && \sqrt{4.8} / 2 % 3 == 9), control structures, composite types.
    • Examples: C, Java.
  • System Programming Languages:
    • Deals with memory, process management, I/O, device drivers, and OS.
    • Examples: C, C++, Ada.
  • Scripting Languages:
    • Used for system administration, text processing, and as "glue" between applications.
    • Often interpreted and include string processing features.
    • Examples: Python, PHP.
  • Domain-Specific Languages:
    • Used in specialized areas.
    • Example: PostScript for vector graphics.

Categories by Paradigms

  • Procedural:
    • Built from procedures/functions with variables, assignment statements, and iteration.
    • Examples: C, Java, Perl, JavaScript, Visual BASIC .NET, C++.
  • Functional:
    • Computations done by applying functions to parameters.
    • Examples: Haskell, LISP, Scheme, ML, F#.
  • Logic:
    • Rule-based.
    • Example: Prolog.

Categories by Task Specification

  • Imperative Languages:
    • Tasks defined as sequences of commands.
    • Tells computer what to do step-by-step.
    • e.g., procedural languages.
  • Declarative Languages:
    • Programs describe desired results without listing commands.
    • e.g., functional and logical languages.

Influential Languages

  • Fortran: Scientific computing.
  • COBOL: Business data processing.
  • Algol: Overcame FORTRAN issues.
  • Pascal: Descendant of Algol, more efficient.

Fortran

  • First well-known high-level language.
  • Developed by IBM.
  • Goals: reduce programming/debugging costs, compete with assembly.
  • Features: assignments, DO loops, IF & GOTO statements, integers, reals, arrays.
  • Early source code had strict formatting (column-based).
  • Variables implicitly declared (I-N: INTEGER, others: reals).
  • Still popular for scientific computing.

TPK Algorithm

  • Reads 11 numbers, stores them in an array, processes in reverse order.
  • Applies a mathematical function and reports the value or an error message (too large).

COBOL

  • Created for business data processing.
  • Verbose syntax for readability.
  • Still in use for business applications.