C Training Datascope Lawrence D - PowerPoint PPT Presentation

About This Presentation
Title:

C Training Datascope Lawrence D

Description:

Fort . Objective C. Object Pascal. Visual Basic. Perl. More OOPL. PHP. REBOL. CLOS. Delphi ... Designed as a system description language, built on ALGOL 60, to ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 26
Provided by: lawrence123
Category:

less

Transcript and Presenter's Notes

Title: C Training Datascope Lawrence D


1
C TrainingDatascopeLawrence DAntonio
  • Lecture 2
  • History of OOP and C

2
OOPL
  • Simula
  • Smalltalk
  • C
  • Java
  • Python
  • C
  • Eiffel
  • Ruby

3
More OOPL
  • Dylan
  • Modula 3
  • Self
  • Sather
  • Forté
  • Objective C
  • Object Pascal
  • Visual Basic
  • Perl

4
More OOPL
  • PHP
  • REBOL
  • CLOS
  • Delphi
  • COBOL
  • Prolog
  • Ada
  • D

5
History of Simula
  • Developed by Kristen Nygaard and Ole-Johan Dahl.
  • Carried out at the Norwegian Computing Center.
  • Designed as a system description language, built
    on ALGOL 60, to implement simulations.
  • Development was begun in 1961, leading to the
    definition of Simula 1 in 1963-4.

6
History of Simula Part 2
  • Process concept Active customers moving through
    a passive network. System Set of interacting
    processes
  • In 1965, Tony Hoare introduced the concept of a
    record class for handling records.
  • Nygaard and Dahl introduce the concept of
    processes with layers in Simula 67.

7
Simula 67 features
  • Introduced classes, subclasses, virtual methods
  • Garbage collection

8
Simula example
  • Class Rectangle (Width, Height) Real Width,
    Height
  • ! Class with two parameters
  • Begin
  • Real Area, Perimeter ! Attributes
  • Procedure Update ! Methods (Can be Virtual)
  • Begin Area Width Height
    Perimeter 2(Width Height)
  • End of Update
  • Boolean Procedure IsSquare
  • IsSquare WidthHeight
  • Update ! Life of rectangle started at creation
    OutText("Rectangle created ")
    OutFix(Width,2,6) OutFix(Height,2,6) OutImage
    End of Rectangle
  • End of Rectangle

9
History of Smalltalk
  • Developed at Xerox PARC in 1971-2.
  • Developed by Alan Kay et al to be a compact
    powerful OOPL, analogous to LISP.
  • Designed in parallel to the Dynabook project.
  • Public release in 1980 (Smalltalk-80).

10
Smalltalk features
  • Pure object-oriented
  • Dynamically and strongly typed
  • Reflective language (self-modifying)
  • Garbage collection
  • Everything is an object. Classes are instances of
    metaclasses.

11
Smalltalk example
  • x y className methodName
  • className 'Foo'.
  • methodName 'hello'.
  • x (Compiler evaluate className).
  • (x isKindOf Class) ifTrue
  • y x new.
  • (y respondsTo methodName asSymbol) ifTrue
  • y perform methodName asSymbol

12
History of Ada
  • In 1975, DoD put out a request for a language
    meeting certain goals (Steelman requirements). No
    existing language met these goals, so a new
    language was created.
  • Jean Ichbiah created the language Ada 83 to
    meet these goals.
  • Ada 95 was the next installment of the
    language, designed by S. Tucker Taft.

13
Ada Features
  • Exception handling
  • Modularity
  • Statically and strongly typed.
  • Generics
  • Dynamic binding
  • Inheritance
  • Garbage collection

14
Ada Example
  • with dates use dates -- definition of type date
  • package persons is
  • type person is tagged
  • record
  • name string(1..10) dob date
  • salary float 0.0
  • end record
  • procedure employ(someonein out person)
  • procedure dismiss(someonein out person)
    procedure pay_raise(someonein out person)
  • end persons

15
Ada Example, Part 2
  • with persons use persons
  • package managers is
  • type manager is new person with
  • record master_key_code string(1..10)
  • end record
  • procedure allocate_master_key( someonein out
    manager code in string)
  • procedure pay_raise(someonein out person)
  • end managers

16
Python History
  • Developed in late 1980s by Guido van Rossum.
    Open source.
  • Published in 1991.
  • Version 1.0 released in 1994.
  • Versions 1.6 and 2.0 released in 2000.
  • GNU GPL compatible since 2001
  • Python 3.0 (Python 3000) released in alpha
    version in 2007.

17
Python Features
  • Simple, easy to learn language
  • Dynamically and strongly typed
  • Metaclasses
  • Exception handling
  • Garbage collection

18
Python Example
  • class Stack
  • def __init__(self) Initialize the stack
  • self.stack
  • def push(self,object)
  • self.stack.append(object)
  • def pop(self)
  • return self.stack.pop()
  • def length(self)
  • return len(self.stack)
  • Example
  • s Stack() Create a stack
  • s.push("Dave") Push some things onto it
  • s.push(42)
  • s.push(3,4,5)
  • x s.pop() x gets 3,4,5
  • y s.pop() y gets 42
  • del s Destroy s

19
C History
  • Bjarne Stroustrup began working on the idea of an
    efficient OOPL in 1979 at ATT Labs.
  • Started developing C with Classes, that combined
    features of Simula and C.
  • 1980 version had classes, inheritance,
    public/private, ctors and dtors, friends, type
    checking, inline, overloading assignment operator

20
C History Part 2
  • Finished the first C compiler, Cfront, in 1983.
    Cfront was written in C, but converted code
    into C.
  • In 1983, Rick Mascitti suggested the name C for
    the language.
  • Added features virtual functions, overloading,
    references, const, operator new

21
C History Part 3
  • In 1985, published first edition of The C
    Programming Language and version 1.0 of C
    released.
  • In 1989, version 2.0 released. Added features
    multiple inheritance, abstract classes, const
    member functions, protected members.
  • In 1990, The Annotated C Reference Manual was
    published.

22
C History Part 4
  • Templates proposed in 1988.
  • Exception handling designed, with Andrew Koenig,
    in 1989.
  • I/O library designed by Jerry Schwarz and Koenig
    for version 2.0.
  • X3J16 standardization committee formed in
    December 1989.

23
Standard Template Library History
  • In 1987 Alex Stepanov and David Musser, at GE
    RD, developed a generic list processing library
    for Ada.
  • Stepanov presented his idea of a generic library
    for C at the November 1993 meeting of X3J16.
  • The library design was developed (with Meng Lee)
    and approved at the March 1994 meeting.

24
C History Part 5
  • C standard was approved on November 14, 1997.
  • Corrected version of the standard was approved in
    2003.

25
C - the Future
  • Library Technical Report 1 (TR1) released in
    2005. Suggestions such as smart pointers,
    metaprogramming, improved functors, improved
    numerical functions, regular expressions, fixed
    size array class, hash tables. Expected to be
    adopted for next version of standard.
Write a Comment
User Comments (0)
About PowerShow.com