Presentation is loading. Please wait.

Presentation is loading. Please wait.

ISBN 0-321-33025-0 Chapter 2 Evolution of the Major Programming Languages.

Similar presentations


Presentation on theme: "ISBN 0-321-33025-0 Chapter 2 Evolution of the Major Programming Languages."— Presentation transcript:

1 ISBN 0-321-33025-0 Chapter 2 Evolution of the Major Programming Languages

2 Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Assembly Language Replaces op-codes of machine language with mnemonics One-to-one mapping from machine language to assembly code Two approaches –CISC = complex instruction set computer 808x assembly language –RISC = reduced instruction set computer MIPS

3 Copyright © 2006 Addison-Wesley. All rights reserved.1-3 Beyond Machine Code What was wrong with using machine code? –Poor readability –Poor modifiability –Expression coding was tedious –Machine deficiencies--no indexing or floating point Pseudocodes were early attempts at high- level languages –Short Code –Speedcoding –UNIVAC compiling system

4 Copyright © 2006 Addison-Wesley. All rights reserved.1-4 Language Categories Imperative –Central features are variables, assignment statements, and iteration –Examples: Fortran, C, Pascal Functional –Main means of making computations is by applying functions to given parameters –Examples: LISP, Scheme Logic (declarative) –Rule-based (rules are specified in no particular order) –Example: Prolog Object-oriented –Data abstraction, inheritance, late binding –Examples: Java, C++ Markup –New; not a programming per se, but used to specify the layout of information in Web documents –Examples: XHTML, XML

5 Copyright © 2006 Addison-Wesley. All rights reserved.1-5 Fortran = FORmula TRANslator Fortran was the first high-level programming language Environment of development –Applications were scientific –No programming methodology or tools –Machine efficiency was most important Design choices –No need for dynamic storage –Need good array handling and counting loops –No string handling, decimal arithmetic, or powerful input/output (commercial stuff)

6 Copyright © 2006 Addison-Wesley. All rights reserved.1-6 Functional Programming: LISP LISt Processing language – Designed at MIT by McCarthy AI research needed a language to –Process data in lists (rather than arrays) –Symbolic computation (rather than numeric) Only two data types: atoms and lists Syntax is based on lambda calculus

7 Copyright © 2006 Addison-Wesley. All rights reserved.1-7 Representation of Two LISP Lists

8 Copyright © 2006 Addison-Wesley. All rights reserved.1-8 Scheme Developed at MIT in mid 1970s Small Extensive use of static scoping Functions as first-class entities Simple syntax (and small size) make it ideal for educational applications

9 Copyright © 2006 Addison-Wesley. All rights reserved.1-9 The First Step Toward Sophistication: ALGOL 60 ALGOL 60 was the result of efforts to design a universal language Goals of the language –Close to mathematical notation –Good for describing algorithms –Must be translatable to machine code

10 Copyright © 2006 Addison-Wesley. All rights reserved.1-10 ALGOL 58 Concept of type was formalized Names could be any length Arrays could have any number of subscripts Parameters were separated by mode (in & out) Subscripts were placed in brackets Compound statements ( begin... end ) Semicolon as a statement separator Assignment operator was := if had an else-if clause No I/O - “would make it machine dependent”

11 Copyright © 2006 Addison-Wesley. All rights reserved.1-11 ALGOL 60 Overview New features –Block structure (local scope) –Two parameter passing methods –Subprogram recursion –Stack-dynamic arrays –Still no I/O and no string handling –Formal syntax description

12 Copyright © 2006 Addison-Wesley. All rights reserved.1-12 Computerizing Business Records: COBOL Environment of development –A number of different business languages were being developed by various organizations Design goals –Must look like simple English –Must be easy to use, even if that means it will be less powerful –Must broaden the base of computer users –Must not be biased by current compiler problems Still the most widely used business applications language

13 Copyright © 2006 Addison-Wesley. All rights reserved.1-13 The Beginning of Timesharing: BASIC Designed by Kemeny & Kurtz at Dartmouth Design Goals: –Easy to learn and use for non-science students –Must be “pleasant and friendly” –Fast turnaround for homework –Free and private access –User time is more important than computer time Never standardized - many versions over the years First widely used language with time sharing

14 Copyright © 2006 Addison-Wesley. All rights reserved.1-14 Some other milestones PL/1 - an attempt to write one language that everyone could use Dynamic typing –APL - lots of operators for vector and matrix operations –SNOBOL - designed for string processing Data abstraction (eventually resulted in Object-Oriented programming) –SIMULA 67

15 Copyright © 2006 Addison-Wesley. All rights reserved.1-15 Early Descendants of ALGOLs ALGOL languages impacted all imperative languages –Pascal - a teaching language that didn't stay in school –C - designed for system applications –Modula/Modula 2 –Ada - language designed by committee –Oberon –C++/Java –Perl (to some extent)

16 Copyright © 2006 Addison-Wesley. All rights reserved.1-16 Programming Based on Logic: Prolog Developed, by Comerauer and Roussel (University of Aix-Marseille), with help from Kowalski ( University of Edinburgh) Based on formal logic Non-procedural Can be summarized as being an intelligent database system that uses an inferencing process to infer the truth of given queries Highly inefficient, small application areas

17 Copyright © 2006 Addison-Wesley. All rights reserved.1-17 Object-Oriented Programming Smalltalk –First full implementation of an object-oriented language (data abstraction, inheritance, and dynamic type binding) C++ –Combines Imperative and Object-Oriented Programming Eiffel Delphi (Borland) –Based on Pascal Java C# –part of.NET programming environment

18 Copyright © 2006 Addison-Wesley. All rights reserved.1-18 Scripting Languages General Scripting Languages –sh and other Unix shell languages –awk –tcl/tk –perl –ruby –python An OO interpreted scripting language Scripting Languages for the Web –JavaScript client side programming interpreted by browser –PHP server side web applications produces HTML code as output Interpreted –A script (file) contains instructions to be executed

19 Copyright © 2006 Addison-Wesley. All rights reserved.1-19 Markup/Programming Hybrid Languages XML, XSLT –eXtensible Markup Language (XML): a metamarkup language –eXtensible Stylesheet Language Transformation (XSTL) transforms XML documents for display –Programming constructs (e.g., looping) JSP –Java Server Pages: a collection of technologies to support dynamic Web documents –servlet: a Java program that resides on a Web server; servlet’s output is displayed by the browser ASP –.NET technologies for web documents

20 Copyright © 2006 Addison-Wesley. All rights reserved.1-20 Genealogy of Common Languages


Download ppt "ISBN 0-321-33025-0 Chapter 2 Evolution of the Major Programming Languages."

Similar presentations


Ads by Google