Programming paradigms and languages
Programming language features exist to provide building blocks to be combined to express programming ideals. Ideally, a programming language should:
- express ideas directly in the code;
- express independent ideas independently;
- express relationships among ideas directly in the code;
- combine ideas freely;
- combine ideas only where combinations make sense;
- express simple ideas simply.
The programming style of a programming language to provide these building blocks may be categorized into programming paradigms. For example, different paradigms may differentiate:
- procedural languages, functional languages, and logical languages;
- different levels of data abstraction;
- different levels of class hierarchy;
- different levels of input datatypes, as in container types and generic programming.
Each of these programming styles has contributed to the synthesis of different programming languages.
A programming language is a set of keywords, symbols, identifiers, and rules by which programmers can communicate instructions to the computer. They follow a set of rules called a syntax.
- Keywords are reserved words to form declarations and statements.
- Symbols are characters to form operations, assignments, control flow, and delimiters.
- Identifiers are words created by programmers to form constants, variable names, structure names, and function names.
- Syntax Rules are defined in the Backus-Naur form.
Programming languages get their basis from formal languages. The purpose of defining a solution in terms of its formal language is to generate an algorithm to solve the underlining problem. An algorithm is a sequence of simple instructions that solve a problem.
- Generations of programming language
- Imperative languages
- Fortran
- COBOL
- Algol
- Basic
- C
- C++
- Declarative languages
- Lisp
- ML
- Prolog
- Object-oriented programming
- Syntax and semantics