Upload
gwenda-thompson
View
215
Download
0
Embed Size (px)
Citation preview
Programming Languages
• What is a programming language? – systematic notation by which we describe computational processes to others– notation for description of algorithms and data structures
computational process – set of steps solve a problem
• computer’s built-in abilities: PRIMITIVE/ constitute Machine Language– arithmetic and logical operations– I/O– Some “control” functions
• High-level programming languages – less primitive notations/ need system software to translate
1
Why study programming languages?
• Linguistic theory states: structure of language defines boundaries of thought ?TRUE?
• Language can facilitate or impede certain modes of thought
• A given programming language can influence class of solutions
2
Benefits of studying languages?
• Computer Scientists– Improve ability to develop algorithms– Improve existing use of language– Increase vocabulary of programming constructs– Allow choice of language– Easier to learn new language– Easier to design new language (user interfaces)
• Language Designers/Implementers– insights from motivation of language facilities to make
implementation tradeoffs
3
Benefits of studying languages?
• Hardware Architects– gain insight into ways machines may better support languages– design a semantically coherent machine w/ complete sets of data types and
operations
• System designers– apply to human interfaces– JCL’s, DB systems, editors, text formatters, debuggers have many characteristics of a
programming language– Necessary for file systems, linkage editors to interface with programming languages
• Software Managers
– choice of language– choice of extension of language or new language and know costs
4
Early History
1500-3000 B.C. earliest know algorithm on clay tablets in Babylon (near Baghdad, Iraq)
• produced mathematical tables• solved algebraic equations using an “algorithm”• at end put “this is the procedure”• did not have conditional tests (no 0 or negative numbers)• did have repetition
5
Early History• 300 B.C. Euclid Greece
– algorithm for computing GCD of 2 integers (zero still not recognized, so special cases)
• 19th, early 20th century– Charles Babbage English
– 2 machines: • Difference Engine: finite differences, repeated additions, math tables• Analytical Engine: many principles of modern computer, any calculation
Store = main memory Mill=ALU barrel = control unit
TABLE 1.2 on Handout – Influences on programming language development6
7
8
Early Computer programming languages by category
• Numerical• WWII 30/40s “electronic calculators” to solve numerical problems• 50s symbolic notations/compilation necessary• 1955-57 Backus’ team – developed FORTRAN
– numerical calculations– full-fledged programming language (control structs, cond, I/O statements)– to compete w/ assembly made very efficient!– Extremely successful– 1958 – Fortran II
Fortran IV
Fortran 77, 90 backwards compatible
9
Early Computer programming languages by category
• Success of FORTRAN -> fear in Europe of domination of IBM– leader Naur of (German Math Society)– joined by ACM despite fear– ALGOL (Algorithmic Language) 58, 60– Standard in “academia”– GOALS (4)
• Close to standard math• Useful to describe algorithm• Compilable• Machine independent (no I/O)
– Not successful– MAJOR IMPACT – syntactic notation BNF
10
Early Computer programming languages by category
• AI Languages50s – IPL – Info Processing language by Rand Corp (widely known, but use
limited)– John McCarthy of MIT designed LISP (List Processing) for IBM 704
=> Scheme and Common Lisp• list processing FUNCTIONAL Language• usual problems: searching
text processing => SNOBOL
– Prolog – special purpose based on math logic
11
Early Computer programming languages by category
• Systems Languages– Assembly language– CPL, BCPL – not widespread– C – Unix written mostly in C in 1970s
12
ROLE of Programming Languages
• Early: efficient design computers and time expensive vs programmers minor cost• 60s: machines less expensive, programmers more => need portability, maintainability, ease of use • programming languages evolving• COBOL dropping => application generators• APL, PL/1, SNOBOL – practically disappeared• Pascal – past prime, but continued in Ada• Ada – ground lost to C++ and Java• Delphi and C++ Builder• Fortran revised (for supercomputers)
Influences
• capabilities of computers• applications: now games, PCs• programming methods: environment changes,
good methods known now• implementation methods -> effect choices of
features• theory: deepened understanding of strengths and
weaknesses• standards
14
Historical Development of Java
Other references:
• http://www.java.com/en/javahistory/index.jsp• http://ils.unc.edu/blaze/java/javahist.html• http://ei.cs.vt.edu/~wwwbtb/book/chap1/java_hist.html
15
Java 5.02005
Java 1.42002
Java 1.32000
Java 1.21998
Java 11995
Java 1991
Scheme1984
Smalltalk-801980
C++1983
Java SE 6 2007
Java SE 7 20117.25 2013
Java SE 8 Mar 2014
Lisp1.51962
Historical Languages
• C - general-purpose, imperative computer programming language
• C++- Based on C, but has imperative, object-oriented and generic programming feature
• Smalltalk - object-oriented, dynamically typed, reflective programming language. It was designed and created in part for educational use, more so for constructionist learning
• Lisp - practical mathematical notation for computer programs, influenced by Church's lambda calculus. It quickly became the favored programming language for artificial intelligence (AI) research
• Scheme - a minimalist, multi-paradigm dialect of Lisp
16
Historical Development of Python
Reference:
http://www.levenez.com/lang17
Python1991
Pascal AFNOR1983
Pascal1970
ABC1987
Modula 31988
B1981
ANSI C1989
Modula 21979
BCPL1967
Modula1975
C1971
C (K&R)1978
Python 21999
Ruby1993
Python32008
B1969
Historical Languages
• BCPL - Originally intended for writing compilers for other languages
• B - recursive, non-numeric, machine independent applications, such as system and language software
• C - general-purpose, imperative computer programming language
• Pascal - small and efficient language intended to encourage good programming practices using structured programming and data structuring.
• Modula - main innovation of Modula over Pascal is a module system, used for grouping sets of related declarations into program units
18