SlideShare a Scribd company logo
1 of 39
Software ideals and history
Bjarne Stroustrup
www.stroustrup.com/Programming
Overview
 Ideals
 Aims, heroes, techniques
 Languages and language designers
 Early languages to C++
(There is so much more than
what we can cover)
3
Stroustrup/Programming
History and ideas
 One opinion
 “History is bunk”
 Another opinion
 “He who does not know history is condemned to repeat it”
 Our view
 There can be no professionalism without history
 If you know too little of the background of your field you are gullible
 History is littered with plausible ideas that didn’t work
 “I have a bridge I’d like to sell you”
 Ideas and ideals are crucial for practical use
 And they are the real “meat” of history
4
Stroustrup/Programming
What is a programming language?
 A tool for instructing machines
 A notation for algorithms
 A means for communication among programmers
 A tool for experimentation
 A means for controlling computer-controlled gadgets
 A means for controlling computerized devices
 A way of expressing relationships among concepts
 A means for expressing high-level designs
 All of the above!
 And more
5
Stroustrup/Programming
Greek heroes
 Every culture and profession must have ideals and heroes
 Physics: Newton, Einstein, Bohr, Feynman
 Math: Euclid, Euler, Hilbert
 Medicine: Hippocrates, Pasteur, Fleming
6
Stroustrup/Programming
Geek heroes
 Brian Kernighan
 Programmer and writer
extraordinaire
7
 Dennis Ritchie
 Designer and original
implementer of C
Stroustrup/Programming
Another geek hero
 Kristen Nygaard
 Co-inventor (with Ole-
Johan Dahl) of Simula67
and of object-oriented
programming and object-
oriented design
8
Stroustrup/Programming
Yet another geek hero
 Alex Stepanov
 Inventor of the STL and
generic programming
pioneer
9
Stroustrup/Programming
Two extremes
 Academic beauty/perfection/purity
 Commercial expediency
 The pressures towards both are immense
 Both extremes must be avoided for serious progress to occur
 Both extremes encourage overstatement of results (hype) and
understatement (or worse) of alternatives and ancestor languages
10
Stroustrup/Programming
Ideals
 The fundamental aims of good design
 Represent ideas directly in code
 Represent independent ideas independently in code
 Represent relationships among ideas directly in code
 Combine ideas expressed in code freely
 where and only where combinations make sense
 From these follow
 Correctness
 Maintainability
 Performance
 Apply these to the widest possible range of applications
11
Stroustrup/Programming
Ideals have practical uses
 During the start of a project, reviews them to get ideas
 When you are stuck late at night, step back and see
where your code has most departed from the ideals –
this is where the bugs are most likely to lurk and the
design problems are most likely to occur
 Don’t just keep looking in the same place and trying the
same techniques to find the bug
 “The bug is always where you are not looking – or you would have
found it already”
12
Stroustrup/Programming
Ideals are personal
 Chose yours well
13
Stroustrup/Programming
Styles/paradigms
 Procedural programming
 Data abstraction
 Object-oriented programming
 Generic programming
 Functional programming, logic programming, rule-
based programming, constraints-based programming,
aspect-oriented programming, …
14
Stroustrup/Programming
Styles/paradigms
template<class Iter> void draw_all(Iter b, Iter e)
{
for_each(b,e,mem_fun(&Shape::draw)); // draw all shapes in [b:e)
}
Point p(100,100);
Shape* a[] = { new Circle(p,50), new Rectangle(p, 250, 250) };
draw_all(a,a+2);
 Which programming styles/paradigms did we use here?
 Procedural, data abstractions, OOP, and GP
15
Stroustrup/Programming
Styles/paradigms
template<class Cont> void draw_all(Cont& c) // C++11
{
for_each(Shape* p : c) p->draw(); // draw all shapes in c
}
void draw_all(Container& c) // C++14
{
for_each(Shape* p : c) p->draw(); // draw all shapes in c
}
 It’s all just programming!
16
Stroustrup/Programming
Some fundamentals
 Portability is good
 Type safety is good
 High performance is good
 Anything that eases debugging is good
 Access to system resources is good
 Stability over decades is good
 Ease of learning is good
 Small is good
 Whatever helps analysis is good
 Having lots of facilities is good
 You can’t have all at the same time: engineering tradeoffs
17
Stroustrup/Programming
Programming languages
 Machine code
 Bits, octal, or at most decimal numbers
 Assembler
 Registers, load, store, integer add, floating point add, …
 Each new machine had its own assembler
 Higher level languages
 First: Fortran and COBOL
 Rate of language invention
 At least 2000 a decade
 Major languages today
 Really solid statistics are hard to come by
 IDS: about 9 million professional programmers
 COBOL, Fortran, C, C++, Visual Basic, PERL, Java, Javascript
 Ada, C#, PHP, …
18
Stroustrup/Programming
Early programming languages
19
Classic C
Simula
Pascal
Algol68
BCPL
Fortran
Lisp
COBOL
Algol60
PL/I
1950s: 1960s: 1970s:
Red==major commercial use
Yellow==will produce important “offspring”
Stroustrup/Programming
Modern programming languages
20
Object Pascal
C++
Java95
C#
Ada98
C++98
Java04
C++11
Python
Lisp
Smalltalk
Fortran77
Ada
Eiffel
Simula67
COBOL89
PHP
C89
Pascal
PERL
Visual Basic
COBOL04 Javascript
Stroustrup/Programming
Why do we design and evolve languages?
 There are many diverse applications areas
 No one language can be the best for everything
 Programmers have diverse backgrounds and skills
 No one language can be best for everybody
 Problems change
 Over the years, computers are applied in new areas and to new problems
 Computers change
 Over the decades, hardware characteristics and tradeoffs change
 Progress happens
 Over the decades, we learn better ways to design and implement languages
21
Stroustrup/Programming
First modern computer – first compiler
 David Wheeler (1927-2004)
 University of Cambridge
 Exceptional problem solver: hardware, software, algorithms, libraries
 First computer science Ph.D. (1951)
 First paper on how to write correct, reusable, and maintainable code (1951)
 (Thesis advisor for Bjarne Stroustrup )
22
Stroustrup/Programming
Early languages – 1952
 One language for each machine
 Special features for processor
 Special features for “operating system”
 Most had very assembler-like facilities
 It was easy to understand which instructions would be generated
 No portability of code
23
Stroustrup/Programming
Fortran
 John Backus (1924-2007)
 IBM
 FORTRAN, the first high level computer language to be developed.
 We did not know what we wanted and how to do it. It just sort of grew.
 The Backus-Naur Form (BNF), a standard notation to describe the
syntax of a high level programming language.
 A functional programming language called FP, which advocates a
mathematical approach to programming.
24
Stroustrup/Programming
Fortran – 1956
 Allowed programmers to write linear algebra much as they
found it in textbooks
 Arrays and loops
 Standard mathematical functions
 libraries
 Users’ own functions
 The notation was largely machine independent
 Fortran code could often be moved from computer to computer with
only minor modification
 This was a huge improvement
 Arguably the largest single improvement in the history of programming
languages
 Continuous evolution: II, IV, 77, 90, 95, 03, 08, [15]
25
Stroustrup/Programming
COBOL
 “Rear Admiral Dr. Grace Murray Hopper (US
Navy) was a remarkable woman who grandly
rose to the challenges of programming the first
computers. During her lifetime as a leader in
the field of software development concepts, she
contributed to the transition from primitive
programming techniques to the use of
sophisticated compilers. She believed that
‘we've always done it that way’ was not
necessarily a good reason to continue to do so.”
26
Stroustrup/Programming
(1906-1992)
Cobol – 1960
 Cobol was (and sometimes still is) for business programmers
what Fortran was (and sometimes still is) for scientific
programmers
 The emphasis was on data manipulation
 Copying
 Storing and retrieving (record keeping)
 Printing (reports)
 Calculation/computation was seen as a minor matter
 It was hoped/claimed that Cobol was so close to business
English that managers could program and programmers would
soon become redundant
 Continuous evolution: 60, 61, 65, 68, 74, 85, 02
27
Stroustrup/Programming
Lisp
 John McCarthy (1927-2011)
 Stanford University
 AI pioneer
28
Stroustrup/Programming
Lisp – 1960
 List/symbolic processing
 Initially (and often still) interpreted
 Dozens (most likely hundreds) of dialects
 “Lisp has an implied plural”
 Common Lisp
 Scheme
 This family of languages has been (and is) the
mainstay of artificial intelligence (AI) research
 though delivered products have often been in C or C++
29
Stroustrup/Programming
Algol
 Peter Naur (b. 1928)
 Danish Technical University and Regnecentralen
 BNF
 Edsger Dijkstra (1930-2002)
 Mathematisch Centrum, Amsterdam, Eindhoven University of
Technology, Burroughs Corporation , University of Texas (Austin)
 Mathematical logic in programming, algorithms
 THE operating system
30
Stroustrup/Programming
Algol – 1960
 The breakthrough of modern programming language concepts
 Language description
 BNF; separation of lexical, syntactic, and semantic concerns
 Scope
 Type
 The notion of “general purpose programming language”
 Before that languages were either scientific (e.g., Fortran), business (e.g.,
Cobol), string manipulation (e.g., Lisp), simulation, …
 Never reached major non-academic use
31
Algol58 Algol60
Simula67
Algol68
Pascal
Stroustrup/Programming
Simula 67
 Kristen Nygaard (1926-2002) and Ole-Johan Dahl (1931-2002)
 Norwegian Computing Center
 Oslo University
 The start of object-oriented programming and object-oriented design
32
Stroustrup/Programming
Simula 1967
 Address all applications domains rather then a specific domain
 As Fortran, COBOL, etc. did
 Aims to become a true general-purpose programming language
 Model real-world phenomena in code
 represent ideas as classes and class objects
 represent hierarchical relations as class hierarchies
 Classes, inheritance, virtual functions, object-oriented design
 A program becomes a set of interacting objects rather than a
monolith
 Has major (positive) implications for error rates
33
Stroustrup/Programming
C
 Dennis Ritchie (1941-2011)
 Bell Labs
 C and helped with Unix
 Ken Thompson (b. 1943)
 Bell Labs
 Unix
34
 Doug McIlroy (b. 1932)
 Bell Labs
 Everybody’s favorite critic,
discussion partner, and
ideas man (influenced C,
C++, Unix, and much more)
Stroustrup/Programming
Bell Labs – Murray Hill
35
Stroustrup/Programming
C – 1978
 (Relatively) high-level programming language for systems
programming
 Very widely used, weakly checked, systems programming language
 Associated with Unix and through that with Linux and the open source
movement
 Direct map to hardware
 Performance becomes somewhat portable
 Designed and implemented by Dennis Ritchie 1974-78
36
CPL BCPL B
C99
C++
C89
Classic C
C++98
Christopher Strachey, Cambridge, mid-1960s
Martin Richards, Cambridge, 1967
Ken Thompson, BTL, 1972
Stroustrup/Programming
Dennis Ritchie, BTL, 1974
C++11
Bjarne Stroustrup, BTL, 1985
C11
C++
 Bjarne Stroustrup
 AT&T Bell labs
 Texas A&M University
 making abstraction techniques affordable and manageable
for mainstream projects
 pioneered the use of object-oriented and generic
programming techniques in application areas where
efficiency is a premium
37
Stroustrup/Programming
My ideals – in 1980 and more so in 2013
 “To make life easier for the serious programmer”
 i.e., primarily me and my friends/colleagues
 I love writing code
 I like reading code
 I hate debugging
 Elegant and efficient code
 I really dislike choosing between the two
 Elegance, efficiency, and correctness are closely related in
many application domains
 Inelegance/verbosity is a major source of bugs and inefficiencies
38
Stroustrup/Programming
C++ – 1985
 C++ is a general-purpose programming language
with a bias towards systems programming that
 is a better C
 supports data abstraction
 supports object-oriented programming
 supports generic programming
39
Classic C
Simula 67
C++
C with Classes
C++98
ARM C++
1979-84
1978-89
1989
Stroustrup/Programming
C++11
C++14
More information
 More language designer links/photos
 http://www.angelfire.com/tx4/cus/people/
 A few examples of languages:
 http://dmoz.org/Computers/Programming/Languages/
 Textbooks
 Michael L. Scott, Programming Language Pragmatics, Morgan
Kaufmann, 2000, ISBN 1-55860-442-1
 Robert W. Sebesta, Concepts of programming languages,
Addison-Wesley, 2003, ISBN 0-321-19362-8
 History books
 Jean Sammet, Programming Languages: History and
Fundamentals, Prentice-Hall, 1969, ISBN 0-13-729988-5
 Richard L. Wexelblat, History of Programming Languages,
Academic Press, 1981, ISBN 0-12-745040-8
 T. J. Bergin and R. G. Gibson, History of Programming
Languages – II, Addison-Wesley, 1996, ISBN 0-201-89502-1
40
Stroustrup/Programming

More Related Content

Similar to 22_ideals.ppt

Can programming be liberated from the von neumman style
Can programming be liberated from the von neumman styleCan programming be liberated from the von neumman style
Can programming be liberated from the von neumman styleshady_10
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developerAnton Kirillov
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementationBilal Maqbool ツ
 
Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...InfinIT - Innovationsnetværket for it
 
Software Engineering
Software EngineeringSoftware Engineering
Software EngineeringSanjay Saluth
 
Can Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John BackusCan Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John Backusmustafa sarac
 
Backus turingaward lecture
Backus turingaward lectureBackus turingaward lecture
Backus turingaward lectureKulOusemnes
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabDiana Dymolazova
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer ProgrammingHussain Buksh
 
Compoutational Physics
Compoutational PhysicsCompoutational Physics
Compoutational PhysicsSaad Shaukat
 
The History of Programming.pptx
The History of Programming.pptxThe History of Programming.pptx
The History of Programming.pptxsheillakontor
 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programmingRafael Balderosa
 
History of Computer Programming Languages.docx
History of Computer Programming Languages.docxHistory of Computer Programming Languages.docx
History of Computer Programming Languages.docxJawaidAbdulHameed
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developerAnton Kirillov
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 

Similar to 22_ideals.ppt (20)

Can programming be liberated from the von neumman style
Can programming be liberated from the von neumman styleCan programming be liberated from the von neumman style
Can programming be liberated from the von neumman style
 
System softare
System softareSystem softare
System softare
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...Are High Level Programming Languages for Multicore and Safety Critical Conver...
Are High Level Programming Languages for Multicore and Safety Critical Conver...
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Can Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John BackusCan Programming Be Liberated from the von Neumann Style? by John Backus
Can Programming Be Liberated from the von Neumann Style? by John Backus
 
Backus turingaward lecture
Backus turingaward lectureBackus turingaward lecture
Backus turingaward lecture
 
Unit ii oo design 9
Unit ii oo design 9Unit ii oo design 9
Unit ii oo design 9
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer Programming
 
Compoutational Physics
Compoutational PhysicsCompoutational Physics
Compoutational Physics
 
Assignment on basic programming language
Assignment on  basic programming languageAssignment on  basic programming language
Assignment on basic programming language
 
The History of Programming.pptx
The History of Programming.pptxThe History of Programming.pptx
The History of Programming.pptx
 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programming
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
History of Computer Programming Languages.docx
History of Computer Programming Languages.docxHistory of Computer Programming Languages.docx
History of Computer Programming Languages.docx
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developer
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 

Recently uploaded

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

22_ideals.ppt

  • 1. Software ideals and history Bjarne Stroustrup www.stroustrup.com/Programming
  • 2. Overview  Ideals  Aims, heroes, techniques  Languages and language designers  Early languages to C++ (There is so much more than what we can cover) 3 Stroustrup/Programming
  • 3. History and ideas  One opinion  “History is bunk”  Another opinion  “He who does not know history is condemned to repeat it”  Our view  There can be no professionalism without history  If you know too little of the background of your field you are gullible  History is littered with plausible ideas that didn’t work  “I have a bridge I’d like to sell you”  Ideas and ideals are crucial for practical use  And they are the real “meat” of history 4 Stroustrup/Programming
  • 4. What is a programming language?  A tool for instructing machines  A notation for algorithms  A means for communication among programmers  A tool for experimentation  A means for controlling computer-controlled gadgets  A means for controlling computerized devices  A way of expressing relationships among concepts  A means for expressing high-level designs  All of the above!  And more 5 Stroustrup/Programming
  • 5. Greek heroes  Every culture and profession must have ideals and heroes  Physics: Newton, Einstein, Bohr, Feynman  Math: Euclid, Euler, Hilbert  Medicine: Hippocrates, Pasteur, Fleming 6 Stroustrup/Programming
  • 6. Geek heroes  Brian Kernighan  Programmer and writer extraordinaire 7  Dennis Ritchie  Designer and original implementer of C Stroustrup/Programming
  • 7. Another geek hero  Kristen Nygaard  Co-inventor (with Ole- Johan Dahl) of Simula67 and of object-oriented programming and object- oriented design 8 Stroustrup/Programming
  • 8. Yet another geek hero  Alex Stepanov  Inventor of the STL and generic programming pioneer 9 Stroustrup/Programming
  • 9. Two extremes  Academic beauty/perfection/purity  Commercial expediency  The pressures towards both are immense  Both extremes must be avoided for serious progress to occur  Both extremes encourage overstatement of results (hype) and understatement (or worse) of alternatives and ancestor languages 10 Stroustrup/Programming
  • 10. Ideals  The fundamental aims of good design  Represent ideas directly in code  Represent independent ideas independently in code  Represent relationships among ideas directly in code  Combine ideas expressed in code freely  where and only where combinations make sense  From these follow  Correctness  Maintainability  Performance  Apply these to the widest possible range of applications 11 Stroustrup/Programming
  • 11. Ideals have practical uses  During the start of a project, reviews them to get ideas  When you are stuck late at night, step back and see where your code has most departed from the ideals – this is where the bugs are most likely to lurk and the design problems are most likely to occur  Don’t just keep looking in the same place and trying the same techniques to find the bug  “The bug is always where you are not looking – or you would have found it already” 12 Stroustrup/Programming
  • 12. Ideals are personal  Chose yours well 13 Stroustrup/Programming
  • 13. Styles/paradigms  Procedural programming  Data abstraction  Object-oriented programming  Generic programming  Functional programming, logic programming, rule- based programming, constraints-based programming, aspect-oriented programming, … 14 Stroustrup/Programming
  • 14. Styles/paradigms template<class Iter> void draw_all(Iter b, Iter e) { for_each(b,e,mem_fun(&Shape::draw)); // draw all shapes in [b:e) } Point p(100,100); Shape* a[] = { new Circle(p,50), new Rectangle(p, 250, 250) }; draw_all(a,a+2);  Which programming styles/paradigms did we use here?  Procedural, data abstractions, OOP, and GP 15 Stroustrup/Programming
  • 15. Styles/paradigms template<class Cont> void draw_all(Cont& c) // C++11 { for_each(Shape* p : c) p->draw(); // draw all shapes in c } void draw_all(Container& c) // C++14 { for_each(Shape* p : c) p->draw(); // draw all shapes in c }  It’s all just programming! 16 Stroustrup/Programming
  • 16. Some fundamentals  Portability is good  Type safety is good  High performance is good  Anything that eases debugging is good  Access to system resources is good  Stability over decades is good  Ease of learning is good  Small is good  Whatever helps analysis is good  Having lots of facilities is good  You can’t have all at the same time: engineering tradeoffs 17 Stroustrup/Programming
  • 17. Programming languages  Machine code  Bits, octal, or at most decimal numbers  Assembler  Registers, load, store, integer add, floating point add, …  Each new machine had its own assembler  Higher level languages  First: Fortran and COBOL  Rate of language invention  At least 2000 a decade  Major languages today  Really solid statistics are hard to come by  IDS: about 9 million professional programmers  COBOL, Fortran, C, C++, Visual Basic, PERL, Java, Javascript  Ada, C#, PHP, … 18 Stroustrup/Programming
  • 18. Early programming languages 19 Classic C Simula Pascal Algol68 BCPL Fortran Lisp COBOL Algol60 PL/I 1950s: 1960s: 1970s: Red==major commercial use Yellow==will produce important “offspring” Stroustrup/Programming
  • 19. Modern programming languages 20 Object Pascal C++ Java95 C# Ada98 C++98 Java04 C++11 Python Lisp Smalltalk Fortran77 Ada Eiffel Simula67 COBOL89 PHP C89 Pascal PERL Visual Basic COBOL04 Javascript Stroustrup/Programming
  • 20. Why do we design and evolve languages?  There are many diverse applications areas  No one language can be the best for everything  Programmers have diverse backgrounds and skills  No one language can be best for everybody  Problems change  Over the years, computers are applied in new areas and to new problems  Computers change  Over the decades, hardware characteristics and tradeoffs change  Progress happens  Over the decades, we learn better ways to design and implement languages 21 Stroustrup/Programming
  • 21. First modern computer – first compiler  David Wheeler (1927-2004)  University of Cambridge  Exceptional problem solver: hardware, software, algorithms, libraries  First computer science Ph.D. (1951)  First paper on how to write correct, reusable, and maintainable code (1951)  (Thesis advisor for Bjarne Stroustrup ) 22 Stroustrup/Programming
  • 22. Early languages – 1952  One language for each machine  Special features for processor  Special features for “operating system”  Most had very assembler-like facilities  It was easy to understand which instructions would be generated  No portability of code 23 Stroustrup/Programming
  • 23. Fortran  John Backus (1924-2007)  IBM  FORTRAN, the first high level computer language to be developed.  We did not know what we wanted and how to do it. It just sort of grew.  The Backus-Naur Form (BNF), a standard notation to describe the syntax of a high level programming language.  A functional programming language called FP, which advocates a mathematical approach to programming. 24 Stroustrup/Programming
  • 24. Fortran – 1956  Allowed programmers to write linear algebra much as they found it in textbooks  Arrays and loops  Standard mathematical functions  libraries  Users’ own functions  The notation was largely machine independent  Fortran code could often be moved from computer to computer with only minor modification  This was a huge improvement  Arguably the largest single improvement in the history of programming languages  Continuous evolution: II, IV, 77, 90, 95, 03, 08, [15] 25 Stroustrup/Programming
  • 25. COBOL  “Rear Admiral Dr. Grace Murray Hopper (US Navy) was a remarkable woman who grandly rose to the challenges of programming the first computers. During her lifetime as a leader in the field of software development concepts, she contributed to the transition from primitive programming techniques to the use of sophisticated compilers. She believed that ‘we've always done it that way’ was not necessarily a good reason to continue to do so.” 26 Stroustrup/Programming (1906-1992)
  • 26. Cobol – 1960  Cobol was (and sometimes still is) for business programmers what Fortran was (and sometimes still is) for scientific programmers  The emphasis was on data manipulation  Copying  Storing and retrieving (record keeping)  Printing (reports)  Calculation/computation was seen as a minor matter  It was hoped/claimed that Cobol was so close to business English that managers could program and programmers would soon become redundant  Continuous evolution: 60, 61, 65, 68, 74, 85, 02 27 Stroustrup/Programming
  • 27. Lisp  John McCarthy (1927-2011)  Stanford University  AI pioneer 28 Stroustrup/Programming
  • 28. Lisp – 1960  List/symbolic processing  Initially (and often still) interpreted  Dozens (most likely hundreds) of dialects  “Lisp has an implied plural”  Common Lisp  Scheme  This family of languages has been (and is) the mainstay of artificial intelligence (AI) research  though delivered products have often been in C or C++ 29 Stroustrup/Programming
  • 29. Algol  Peter Naur (b. 1928)  Danish Technical University and Regnecentralen  BNF  Edsger Dijkstra (1930-2002)  Mathematisch Centrum, Amsterdam, Eindhoven University of Technology, Burroughs Corporation , University of Texas (Austin)  Mathematical logic in programming, algorithms  THE operating system 30 Stroustrup/Programming
  • 30. Algol – 1960  The breakthrough of modern programming language concepts  Language description  BNF; separation of lexical, syntactic, and semantic concerns  Scope  Type  The notion of “general purpose programming language”  Before that languages were either scientific (e.g., Fortran), business (e.g., Cobol), string manipulation (e.g., Lisp), simulation, …  Never reached major non-academic use 31 Algol58 Algol60 Simula67 Algol68 Pascal Stroustrup/Programming
  • 31. Simula 67  Kristen Nygaard (1926-2002) and Ole-Johan Dahl (1931-2002)  Norwegian Computing Center  Oslo University  The start of object-oriented programming and object-oriented design 32 Stroustrup/Programming
  • 32. Simula 1967  Address all applications domains rather then a specific domain  As Fortran, COBOL, etc. did  Aims to become a true general-purpose programming language  Model real-world phenomena in code  represent ideas as classes and class objects  represent hierarchical relations as class hierarchies  Classes, inheritance, virtual functions, object-oriented design  A program becomes a set of interacting objects rather than a monolith  Has major (positive) implications for error rates 33 Stroustrup/Programming
  • 33. C  Dennis Ritchie (1941-2011)  Bell Labs  C and helped with Unix  Ken Thompson (b. 1943)  Bell Labs  Unix 34  Doug McIlroy (b. 1932)  Bell Labs  Everybody’s favorite critic, discussion partner, and ideas man (influenced C, C++, Unix, and much more) Stroustrup/Programming
  • 34. Bell Labs – Murray Hill 35 Stroustrup/Programming
  • 35. C – 1978  (Relatively) high-level programming language for systems programming  Very widely used, weakly checked, systems programming language  Associated with Unix and through that with Linux and the open source movement  Direct map to hardware  Performance becomes somewhat portable  Designed and implemented by Dennis Ritchie 1974-78 36 CPL BCPL B C99 C++ C89 Classic C C++98 Christopher Strachey, Cambridge, mid-1960s Martin Richards, Cambridge, 1967 Ken Thompson, BTL, 1972 Stroustrup/Programming Dennis Ritchie, BTL, 1974 C++11 Bjarne Stroustrup, BTL, 1985 C11
  • 36. C++  Bjarne Stroustrup  AT&T Bell labs  Texas A&M University  making abstraction techniques affordable and manageable for mainstream projects  pioneered the use of object-oriented and generic programming techniques in application areas where efficiency is a premium 37 Stroustrup/Programming
  • 37. My ideals – in 1980 and more so in 2013  “To make life easier for the serious programmer”  i.e., primarily me and my friends/colleagues  I love writing code  I like reading code  I hate debugging  Elegant and efficient code  I really dislike choosing between the two  Elegance, efficiency, and correctness are closely related in many application domains  Inelegance/verbosity is a major source of bugs and inefficiencies 38 Stroustrup/Programming
  • 38. C++ – 1985  C++ is a general-purpose programming language with a bias towards systems programming that  is a better C  supports data abstraction  supports object-oriented programming  supports generic programming 39 Classic C Simula 67 C++ C with Classes C++98 ARM C++ 1979-84 1978-89 1989 Stroustrup/Programming C++11 C++14
  • 39. More information  More language designer links/photos  http://www.angelfire.com/tx4/cus/people/  A few examples of languages:  http://dmoz.org/Computers/Programming/Languages/  Textbooks  Michael L. Scott, Programming Language Pragmatics, Morgan Kaufmann, 2000, ISBN 1-55860-442-1  Robert W. Sebesta, Concepts of programming languages, Addison-Wesley, 2003, ISBN 0-321-19362-8  History books  Jean Sammet, Programming Languages: History and Fundamentals, Prentice-Hall, 1969, ISBN 0-13-729988-5  Richard L. Wexelblat, History of Programming Languages, Academic Press, 1981, ISBN 0-12-745040-8  T. J. Bergin and R. G. Gibson, History of Programming Languages – II, Addison-Wesley, 1996, ISBN 0-201-89502-1 40 Stroustrup/Programming