编程语言概述

本文主要是回顾编程语言的历史、高级视图-树和图形、编程语言的概念、主要编程语言的演变、脚本和标记、编程混合语言、编程语言的历史、编程语言的准则、学习史提夫编程语言。
展开查看详情

1.Overview of Programming Languages Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 371 Fairfield Way, Box U-255 Storrs, CT 06269-3255 Steven.Demurjian@uconn.edu http://www.engr.uconn.edu/~steve (860) 486–4818 (Office) (860) 486-3719 (CSE Office)

2.Overview Review the History of Programming Languages https://en.wikipedia.org/wiki/History_of_programming_languages High level View –Trees and Graphs Chapter 2 of Concepts of Programming Languages Evolution of the Major Programming Languages Fortran, Lisp, ALGOL 60, COBOL, Basic PL/I, APL,SNOBOL, SIMULA 67, ALGOL 68 Prolog, Ada, Smalltalk, C++, Java, C# Scripting & Markup/Programming Hybrid Languages Excerpts from Potted History of Programming Languages ( Vitaly Shmatikov ) www.cs.utexas.edu/~shmat/courses/cs345/03history.ppt Ethics in Programming Languages Programming Languages Steve Learned

3.Tree of Languages http://blog.terrencemiao.com/google-plus/the-family-tree-of-all-the-programming-languages-you-even-only-know-the-name/

4.https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwi17K3uwprRAhVC2IMKHTgXBYsQjRwIBw&url=https%3A%2F%2Fwww.pinterest.com%2Fpin%2F455708056017497102%2F&psig=AFQjCNEAepbKclsz05WFVGL7PrAuYArWrA&ust=1483139095903121

5.https://griffsgraphs.wordpress.com/2012/07/01/programming-languages-influences/

6.

7.Chapter 2 Evolution of the Major Programming Languages http://www.sce.carleton.ca/courses/sysc-3101/w12/slides/pl9ch2.ppt

8.Copyright © 2015 Pearson. All rights reserved. 1- 8 Chapter 2 Topics Zuse’s Plankalkül Minimal Hardware Programming: Pseudocodes The IBM 704 and Fortran Functional Programming: Lisp The First Step Toward Sophistication: ALGOL 60 Computerizing Business Records: COBOL The Beginnings of Timesharing: Basic

9.Copyright © 2015 Pearson. All rights reserved. 1- 8 Chapter 2 Topics Zuse’s Plankalkül Minimal Hardware Programming: Pseudocodes The IBM 704 and Fortran Functional Programming: Lisp The First Step Toward Sophistication: ALGOL 60 Computerizing Business Records: COBOL The Beginnings of Timesharing: Basic

10.Copyright © 2015 Pearson. All rights reserved. 1- 10 Chapter 2 Topics (continued) Object-Oriented Programming: Smalltalk Combining Imperative ad Object-Oriented Features: C++ An Imperative-Based Object-Oriented Language: Java Scripting Languages The Flagship .NET Language: C# Markup/Programming Hybrid Languages

11.Copyright © 2015 Pearson. All rights reserved. 1- 11 Genealogy of Common Languages

12.Copyright © 2015 Pearson. All rights reserved. 1- 12 Zuse’s Plankalkül Designed in 1945, but not published until 1972 Never implemented Advanced data structures floating point, arrays, records Invariants

13.Copyright © 2015 Pearson. All rights reserved. 1- 13 Plankalkül Syntax An assignment statement to assign the expression A[4] + 1 to A[5] | A + 1 => A V | 4 5 (subscripts) S | 1.n 1.n (data types)

14.Copyright © 2015 Pearson. All rights reserved. 1- 14 Minimal Hardware Programming: Pseudocodes What was wrong with using machine code? Poor readability Poor modifiability Expression coding was tedious Machine deficiencies--no indexing or floating point

15.Copyright © 2015 Pearson. All rights reserved. 1- 15 Pseudocodes: Short Code Short Code developed by Mauchly in 1949 for BINAC computers Expressions were coded, left to right Example of operations: 01 – 06 abs value 1n (n+2)nd power 02 ) 07 + 2n (n+2)nd root 03 = 08 pause 4n if <= n 04 / 09 ( 58 print and tab

16.Copyright © 2015 Pearson. All rights reserved. 1- 16 Pseudocodes: Speedcoding Speedcoding developed by Backus in 1954 for IBM 701 Pseudo ops for arithmetic and math functions Conditional and unconditional branching Auto-increment registers for array access Slow! Only 700 words left for user program

17.Copyright © 2015 Pearson. All rights reserved. 1- 17 Pseudocodes: Related Systems The UNIVAC Compiling System Developed by a team led by Grace Hopper Pseudocode expanded into machine code David J. Wheeler (Cambridge University) developed a method of using blocks of re-locatable addresses to solve the problem of absolute addressing

18.Copyright © 2015 Pearson. All rights reserved. 1- 18 IBM 704 and Fortran Fortran 0: 1954 - not implemented Fortran I:1957 Designed for the new IBM 704, which had index registers and floating point hardware - This led to the idea of compiled programming languages, because there was no place to hide the cost of interpretation (no floating-point software) Environment of development Computers were small and unreliable Applications were scientific No programming methodology or tools Machine efficiency was the most important concern

19.Copyright © 2015 Pearson. All rights reserved. 1- 19 Design Process of Fortran Impact of environment on design of Fortran I No need for dynamic storage Need good array handling and counting loops No string handling, decimal arithmetic, or powerful input/output (for business software)

20.Copyright © 2015 Pearson. All rights reserved. 1- 20 Fortran I Overview First implemented version of Fortran Names could have up to six characters Post-test counting loop ( DO ) Formatted I/O User-defined subprograms Three-way selection statement (arithmetic IF ) No data typing statements

21.Copyright © 2015 Pearson. All rights reserved. 1- 21 Fortran I Overview (continued) First implemented version of FORTRAN No separate compilation Compiler released in April 1957, after 18 worker-years of effort Programs larger than 400 lines rarely compiled correctly, mainly due to poor reliability of 704 Code was very fast Quickly became widely used

22.Copyright © 2015 Pearson. All rights reserved. 1- 22 Fortran II Distributed in 1958 Independent compilation Fixed the bugs

23.Copyright © 2015 Pearson. All rights reserved. 1- 23 Fortran IV Evolved during 1960-62 Explicit type declarations Logical selection statement Subprogram names could be parameters ANSI standard in 1966

24.Copyright © 2015 Pearson. All rights reserved. 1- 24 Fortran 77 Became the new standard in 1978 Character string handling Logical loop control statement IF-THEN-ELSE statement

25.Copyright © 2015 Pearson. All rights reserved. 1- 25 Fortran 90 Most significant changes from Fortran 77 Modules Dynamic arrays Pointers Recursion CASE statement Parameter type checking

26.Copyright © 2015 Pearson. All rights reserved. 1- 26 Latest versions of Fortran Fortran 95 – relatively minor additions, plus some deletions Fortran 2003 – support for OOP, procedure pointers, interoperability with C Fortran 2008 – blocks for local scopes, co-arrays, Do Concurrent

27.Copyright © 2015 Pearson. All rights reserved. 1- 27 Fortran Evaluation Highly optimizing compilers (all versions before 90) Types and storage of all variables are fixed before run time Dramatically changed forever the way computers are used

28.FORTRAN History One of the oldest computer languages created by John Backus and released in 1957 designed for scientific and engineering computations Version history FORTRAN 1957 FORTRAN II FORTRAN IV FORTRAN 66 (released as ANSI standard in 1966) FORTRAN 77 (ANSI standard in 1977) FORTRAN 90 (ANSI standard in 1990) FORTRAN 95 (ANSI standard version) FORTRAN 2003 (ANSI standard version) Many different “dialects” produced by computer vendors (Digital VAX Fortran, now Intel Fortran) Large majority of existing engineering software is coded in FORTRAN (various versions) http://soliton.ae.gatech.edu/classes/ae6382/fortran/Programming_with_Fortran.ppt http://soliton.ae.gatech.edu/classes/ae6382/fortran/

29.Statement Source Format Classic format Free format PROGRAM MAIN C COMMENTS ARE ALLOWED IF A “C” IS PLACED IN COLUMN #1 DIMENSION X(10) READ(5,*) (X(I),I=1,10) WRITE(6,1000) X 1000 FORMAT(1X,’THIS IS A VERY LONG LINE OF TEXT TO SHOW HOW TO CONTINUE ’ * ‘THE STATEMENT TO A SECOND LINE’,/,10F12.4) PROGRAM MAIN ! A COMMENT DIMENSION X(10) READ(5,*) (X(I),I=1,10) WRITE(6,1000) X ! Another comment 1000 FORMAT(1X,’THIS IS A VERY LONG LINE OF TEXT TO SHOW HOW TO CONTINUE ’& &‘THE STATEMENT TO A SECOND LINE’,/,10F12.4)