Why Study Programming Languages?
- Increased ability to express ideas.
- Improved background for choosing appropriate languages.
- Increased ability to learn new languages.
- Better understanding of significance of implementation.
- Better use of languages that are already known.
- Floating Point
- Fixed Point
- Symbol Manipulation
- Linked Lists
- Direct Memory Access
- Markup (HTML, CSS)
- Server Side (PHP)
- Data Types
- Meaningful keywords
- Simplicity & Orthogonality
- Support for Abstraction
- Type Checking
- Exception Handling
Influences on Language Design
- Data and programs stored.
- Basis for imperative languages.
- Variables are memory cells.
- Code is instructions.
- Fetch-execute Cycle:
- Initialize program counter.
- Repeat Forever:
- Fetch instruction at counter.
- Increment counter.
- Decode the instruction.
- Execute the instruction.
- Earliest languages were for simple programs that had to be efficient.
- In 1960s readability was stressed, structured programs.
- In 1970s data-oriented programming and abstraction.
- In 1980s object-oriented programming: inheritance, polymorphism.
- In 2000s, dynamic programming and rapid development.
- Variables, assignment, iteration are key.
- Computation done by updating variables.
- Examples: C, C++, Java, Python, PHP, Basic
- Most common type.
- Computation done by applying functions to parameters.
- Based on Lambda Calculus.
- Does not rely on modifying variables.
- Recursion more common than iteration.
- Examples: LISP, Haskell, ML
- Specifies rules in any order, and computation follows the rules.
- Markup Hybrids.
- Languages for encoding data with programming features.
- HTML not a programming language.
- Examples: JSTL, XSLT, Postscript, TeX
- Languages developed for a particular use.
- Examples: SQL, Lex & Yacc, Awk, Makefile
- Reliability vs. Efficiency
- Checking array bounds.
- Checking for exceptions.
- Readability vs. Writability
- Flexibility vs. Reliability
Different programming languages expose the underlying machine in different ways.
- Programs are translated into machine language.
- Faster execution.
- Takes time to compile.
- Can be less flexible.
- Lexical Analysis
- Syntax Analysis
- Intermediate Code Generation
- General Optimizations
- Machine Code
- Specific Optimizations
- An interpreter program runs the code.
- Less efficient.
- Very flexible.
- Easier to implement.
- Compromise between compilation and interpretation.
- Compiles down to "bytecode" which is interpreted.
- Just in Time Compilation.
- Faster than pure interpretation.
- There are different types of programming languages.
- Knowing more languages makes you a better programmer.
- Languages have different goals and uses.
- Programming languages are also determined by their tools and environments.
Copyright © 2019 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.