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
- Procedural Programming
- Object-oriented Programming
- Model-based Programming
- Service-oriented/Microservices
- Functional Programming
Reasons for Studying Programming Concepts
- Increased ability to express ideas clearly.
- Improved background for choosing appropriate programming languages.
- Better utilization of languages that are well-designed.
- Overall advancement in computing technology.
Applications of Programming Domains
- Scientific Applications
- Data Processing
- Text Processing
- Artificial Intelligence (AI) Applications
- System Program Applications
Classification by Programming Paradigms
- Procedural-Oriented Paradigm
- Object-Oriented Paradigm
- Functional Programming
- Imperative Programming
- Non-deterministic Paradigms
- 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
- Machine Language / Low-Level Language
- Assembly Language
- 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
- Variables: Names used to store data.
- Syntax: The structure of statements that the language follows.
- Control Structures: Constructs that control the flow of a program (e.g., loops, conditionals).
- Data Structures: Formats for organizing data (e.g., arrays, strings).
- 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).
- Tools: Software used for programming including compilers, debuggers, and IDEs (Integrated Development Environments).