Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Languages – An introduction. There are 10 types of people in the world −Those who understand binary −Those who don’t.

Similar presentations


Presentation on theme: "Programming Languages – An introduction. There are 10 types of people in the world −Those who understand binary −Those who don’t."— Presentation transcript:

1 Programming Languages – An introduction

2 There are 10 types of people in the world −Those who understand binary −Those who don’t

3 Programming Languages The purpose of language is simply that it must convey meaning. (Confucius) That which can be said, can be said clearly. (Wittgenstein,1963) A program is a specification of a computation. A programming language is a notation for writing programs.(Sethi,89)

4 The Most Important Open Problem in Computing Increasing Programmer Productivity −Write programs correctly −Write programs quickly −Write programs easily Why? −Decreases support cost −Decreases development cost −Decreases time to market −Increases satisfaction

5 How to increase Programmer Productivity? 3 ways of increasing programmer productivity: 1.Process (software engineering) Controlling programmers Good process can yield up to 20% increase 2.Tools (verification, static analysis, program generation) Good tools can yield up to 10% increase Language design --- the center of the universe! 3.Core abstractions, mechanisms, services, guarantees −Affect how programmers approach a task (C vs. SML) −New languages can yield 700% increase

6 Why Are There So Many Programming Languages Why does some people speak French? Programming languages have evolved over time as better ways have been developed to design them. −First programming languages were developed in the 1950s −Since then thousands of languages have been developed Different programming languages are designed for different types of programs.

7 C Different Programming language Design Philosophies Other languages If all you have is a hammer, then everything looks like a nail.

8 Influences on programming languages Computer capabilities Hardware and OS Applications Wide area of applications Programming methods Multiprogramming, interactive systems, data abstraction, formal semantics, O-O programming,… Implementation methods Theoretical studies Standardization

9 Attributes of a good language Clarity, simplicity, and unity −Have a minimum number of different concepts, with the rules for their combination, simple and regular (conceptual integrity). −Readability Orthogonality −Being able to combine various features of a language in all possible combinations. Naturalness for the application Support for abstraction

10 Attributes of a good language Ease of program verification −Proof of correctness, desk checking, test −Simplicity of semantic and syntax Programming environment Portability of programs Cost of use −Program execution −Program translation −Program creation, testing, and use −Program maintenance

11 Attributes of a good language Reliability −Writability −Readability −Simplicity −Safety (goto, pointers) −Robustness Maintainability −Factoring (modularity) −Locality Efficiency

12 Charles Babbage (1791-1871) The Father of Computers

13 Charles Babbage’s Difference Engine

14 Charles Babbage’s Analytical Engine

15 Lady Augusta Ada Countess of Lovelace Lady Augusta Ada Countess of Lovelace

16 Programming Language History 1940s The first electronic computers were monstrous contraptions −Programmed in binary machine code by hand −Code is not reusable or relocatable −Computation and machine maintenance were difficult: cathode tubes regularly burned out The term ‘‘bug’’ originated from a bug that reportedly roamed around in a machine causing short circuits

17 Programming Language History Late 1940s early 1950s Assembly languages −invented to allow machine operations to be expressed in mnemonic abbreviations −Enables larger, reusable, and re-locatable programs −Actual machine code is produced by an assembler −Early assemblers had a one-to-one correspondence between assembly and machine instructions −Later: expansion of macros into multiple machine instructions to achieve a form of higher-level programming

18 Programming Language History Mid 1950s Fortran, the first higher-level language −Now programs could be developed that were machine independent! −Main computing activity in the 50s: solve numerical problems in science and engineering −Other high-level languages soon followed: Algol 58 is an improvement compared to Fortran Cobol for business computing Lisp for symbolic computing and artificial intelligence BASIC for "beginners"

19 Programming Language History 1960s Structured Programming, Dijkstra, Dahl, and Hoare. Pascal, Niklaus Wirth (ETH, Zurich) −Modelled after Algol −No GOTO −Very strongly typed −Procedures nested inside each other −Designed for teaching programming Simula, Dahl and Nygaard (Norway) −The first language with objects, classes, and subclasses

20 Programming Language History 1970s C, Ken Thompson (Bell Labs) −Successor to B, which was stripped-down BCPL. −High-level constructs and low-level power Ada, Jean Ichbiah (France) −Instigated by the Department of Defense −Designed for systems programming, especially embedded systems.

21 Programming Language History 1970s Smalltalk, Alan Kay, Adele Goldberg (Xerox PARC) −Graphics-rich GUI Fonts −Object-oriented Everything is an object Objects communicate through messages Scheme, Gerald Sussman & Guy Steele (MIT) −LISP with static scoping Prolog, Philippe Roussel (France) −Based on rules, facts, and queries.

22 Programming Language History 1980s Object-oriented programming −Important innovation for software development −The concept of a class is based on the notion of data type abstraction from Simula 67, a language for discrete event simulation that has classes but no inheritance 1979-1983: C++ Bjarne Stroustrop (Bell Labs) −Originally thought of as “C with classes”. −First widely-accepted object-oriented language. −First implemented as a pre-processor for the C compiler.

23 Programming Language History 1980s Functional Programming −Extensive list of new concepts Lazy vs. eager evaluation Pure vs. imperative features Parametric polymorphism Type inference (Garbage collection) −Hope −Clean −Haskell −SML −Caml

24 The 1990s: the Internet age HTML, Tim Berners-Lee (CERN) −“Hypertext Markup Language” Language of the World Wide Web. Scripting languages −PERL. CGI or Apache module −Languages within Web pages JavaScript, VBScript PHP, ASP, JSP Some important languages that were developed in this time period include: −1990 – Python −1991 – Java −1995 – PHP −1996 – ASP −2000 – C#

25 Programming Language Genealogy

26 Assembled, Compiled, or Interpreted Languages All programs must be translated before their instructions can be executed. Computer languages can be grouped according to which translation process is used to convert the instructions into binary code: −Assemblers −Interpreters −Compilers

27 Assembled, Compiled, or Interpreted Languages Assembled languages: −Assembler: a program used to translate Assembly language programs. −Produces one line of binary code per original program statement. −The entire program is assembled before the program is sent to the computer for execution.

28 Assembled, Compiled, or Interpreted Languages Interpreted Languages: −Interpreter: A program used to translate high-level programs. −Translates one line of the program into binary code at a time: An instruction is fetched from the original source code. The Interpreter checks the single instruction for errors. (If an error is found, translation and execution ceases. Otherwise…) The instruction is translated into binary code. The binary coded instruction is executed. The fetch and execute process repeats for the entire program.

29 Assembled, Compiled, or Interpreted Languages Compiled languages: −Compiler: a program used to translate high-level programs. −Translates the entire program into binary code before anything is sent to the CPU for execution. −The translation process for a compiled program: First, the Compiler checks the entire program for syntax errors in the original source code. Next, it translates all of the instructions into binary code. −Two versions of the same program exist: the original source code version, and the binary code version (object code). Last, the CPU attempts execution only after the programmer requests that the program be executed.

30 Programming for Everyone Scripting: A series of commands, written to accomplish some task. −Very similar to the concept of a program. −Extends the capabilities of the application where it is being used. −Examples of scripting languages: Perl, VBScript, JavaScript JavaScript: A scripting language that allows the Web page designer to add functional features to a formatted web page created in HTML.

31 The first computer bug Rear Admiral Dr. Grace Murray Hopper "Life was simple before World War II. After that, we had systems."


Download ppt "Programming Languages – An introduction. There are 10 types of people in the world −Those who understand binary −Those who don’t."

Similar presentations


Ads by Google