Presentation is loading. Please wait.

Presentation is loading. Please wait.

Welcome to the CIS Seminar I Prof Peterson's OF PROGRAMMING LANGUAGES.

Similar presentations


Presentation on theme: "Welcome to the CIS Seminar I Prof Peterson's OF PROGRAMMING LANGUAGES."— Presentation transcript:

1 Welcome to the CIS Seminar I Prof Peterson's OF PROGRAMMING LANGUAGES

2 Scheduling Sept 22: Rich Osborne Sept 29: Andy Keck (Mathematica) Oct 6: Tim (Ruby) Oct 19: Alex Chiang (HP) Oct 26: Rory (Prolog) Nov 3: Randy Spydell

3 Simula Simula expanded on Algol to add objects, classes, methods, GC. It is the ancestor of object oriented programming. 1962 Ole-Johan Dahl and Kristen Nygaard External Class Geometry; Geometry Begin ! Subclasses declared in the prefixed block: ; Point Class Color_Point(C); Character C; Begin... End; Rectangle Class Square; Begin... End; ! Variables declared in the prefixed block: ; Ref(Color_Point) A1; Ref(Point) C, D; Ref(Circle) K; Ref(Line) E, F; Ref(Rectangle) R1; Ref(Square) S1; ! Block body: ; C :- New Point(5,6); D :- New Point(20,30); A1 :- New Color_Point(3, 4, 'G'); K :- New Circle(10, C); E :- New Line(C, D); F :- X; K.Shift (1,1); R1 :- New Rectangle("Rec_R1", 5, 4); S1 :- New Square("Square_S1", 4, 6); S1.Show; End of prefixed block;

4 Simula * Simula was designed for discrete event based simulation – something that O-O does very well! * It took a long time for O-O ideas to hit the mainstream (C++)

5 Basic Two guys at Dartmouth (John Kemeny and Thomas Kurtz) wanted to create a language to teach computing that was simple and oriented towards time-sharing. 1963 10 INPUT "What is your name: "; U$ 20 PRINT "Hello "; U$ 30 REM 40 INPUT "How many stars do you want: "; N 50 S$ = "" 60 FOR I = 1 TO N 70 S$ = S$ + "*" 80 NEXT I 90 PRINT S$ 100 REM 110 INPUT "Do you want more stars? "; A$ 120 IF LEN(A$) = 0 THEN GOTO 110 130 A$ = LEFT$(A$, 1) 140 IF (A$ = "Y") OR (A$ = "y") THEN GOTO 40 150 PRINT "Goodbye "; 160 FOR I = 1 TO 200 170 PRINT U$; " "; 180 NEXT I 190 PRINT

6 About Basic * Shows how education influences practice * Success was in the implementation rather than the design * Kemeny was a student of Church * Could be implemented on tiny machines * Bill Gates! * Led to a long line of "thrown together scripting languages" like Perl (ugh!)

7 PL/I PL/I was the "anti-Basic": a huge language designed to subsume all others. It was a commercial flop. 1965 Test: procedure options(main); declare My_String char(20) varying initialize('Hello, world!'); put skip list(My_String); end Test;

8 Lessons of PL/I * Complexity inhibits implementation – it's tough to understand how hard a language is to implement while writing a standard * Vendors can't tell users what language to use * Being a little better is not good enough

9 C C is: * A language that addresses low level concerns. If the machine can do it, C can do it. And vice versa. * Considered a portable assembler – compilation should be easy to understand * Way more successful than intended * Did "one thing" very well * Make Unix what it is today – previous OS efforts were in assembly language and not portable 1972 Previous language was "B"

10 Prolog * Logic turned into a programming language * Wildly different computational engine * Does a limited set of things extremely well * Once thought to be the language of the future – now just a specialty language * Illustrates some really interesting semantic issues * Rory will show us how this works soon! 1972

11 Ada * Moral successor to PL/I although it was more for embedded systems * Pushed by the department of defense (the "ADA Mandate") * Widely hated / ignored by programmers, never adopted by academia * Never widely adopted by industry – abandoned for COTS technologies * Still alive – widely used in the aircraft industry 1980

12 C++ C++ was created by Bjarne Stroustrup in an effort to merge the elegance of Simula with the performance of C C++ caught on in a big way and is still very much alive C++ has evolved into an extremely complex language that has managed to retain performance guarantees 1985

13 ML * The predecessor of Haskell * Introduced the Hindley-Milner type system * Influenced Java generics * Did "one thing" very well * An "academic" language rather than an industrial one * Still going strong

14 Java Java came out of nowhere! During the Internet boom, Sun (James Gosling) decided to simplify C++ and focus on portability (via a "virtual machine"). Java was hyped as the "Language of the Internet" but that didn't really pan out. Widely adopted as an instructional language

15 Other Notable Languages * Snobol / Icon (generators) * Smalltalk (O-O successor to Simula) * Common Lisp / Scheme (evolved Lisps) * Python (pretty looking Lisp) * C# (MS answer to Java) * PHP (Web language of choice) * Haskell (best language in the universe)

16 Languages Are Born Languages form in interesting ways: Committees of experts creating a language to replace a group of similar languages or address a perceived need Lone geniuses (Academics) demonstrating a new theory Hackers trying to solve a specific problem

17 Evolution Languages are never created in a vacuum – designers are always aware of past languages. It's hard to trace PL genealogy sometimes. Once a language "catches on" there is always evolutionary pressure to keep it competitive with other languages. This is an issue that the language community has to deal with

18 Ecology Every programming language inhabits an identifiable "ecological niche" that enables it to survive. Some of the niches: * Corporate investment * Academic / research * Hacker * Performance-based * Specific problem domains * Cults

19 On From Here We'll slow down and look at languages in depth. The big questions: * What are the basic "computational models" embodied in programming languages? * How can we dissect programming languages into separable "feature areas"? * What makes a language good for a particular task? * What are the "notable" languages – ones that do some task particularly well?


Download ppt "Welcome to the CIS Seminar I Prof Peterson's OF PROGRAMMING LANGUAGES."

Similar presentations


Ads by Google