330 likes | 488 Views
Programming Languages Third Edition. Chapter 1 – Part 1 The Origins of Programming Languages. First … a QUIZ !!!. Computer Hardware Milestones. Predecessor of “modern day” computer?. mid 1800’s – Analytical Engine designed by Charles Babbage – “Father of the computer”
E N D
Programming LanguagesThird Edition Chapter 1 – Part 1 The Origins of Programming Languages
First … a QUIZ !!! Computer Hardware Milestones Programming Languages, Third Edition
Predecessor of “modern day” computer? • mid 1800’s – Analytical Engine designed by Charles Babbage – “Father of the computer” • Analytical Engine Emulator Programming Languages, Third Edition
First “modern day” computer? • 1940’s – Mark-1 Programming Languages, Third Edition
First “personal computer”? • 1970’s – Apple Programming Languages, Third Edition
First “Business” PC - Predecessor of today’s Windows machines? • IBM PC -1981 Programming Languages, Third Edition
First GUI-based mouse-driven interface? • Apple Macintosh -1984 Programming Languages, Third Edition
End of Quiz! Next • A bit about computer architecture • Some history of programming language devopment Programming Languages, Third Edition
The First Stored Programs (just after Mark I) • John von Neumann CPU should be wired with small set of GENERAL PURPOSE instructions Memory would hold BOTH data and instructions Programming Languages, Third Edition
Machine Language BOTTOM LINE: Machine language programming was tedious and error prone !!! Programming Languages, Third Edition
Assembly Language • 1950’s • a set of mnemonic symbols for instruction codes and memory locations This: MOV AL, VAR1 ADD AL, 25 MOV VAR2, AL Sure beats this: 00110101 00010111 00001010 10111101 00010111 00011001 00110101 00010101 00010111 Programming Languages, Third Edition
Assembly Language (cont’d.) Programming Languages, Third Edition
So … Assembly Language is an improvement, but … has some drawbacks: • Lacks abstraction • Doesn’t look like conventional mathematical notation Y=X+3 Programming Languages, Third Edition
So … Assembly Language is an improvement, but … has some drawbacks: • Lacks portability • Each type of computer hardware architecture has its own machine language instruction set and requires its own dialect of assembly language Programming Languages, Third Edition
So … Assembly Language is an improvement, but … has some drawbacks: ONE machine language statement One assembly language statement = Programming Languages, Third Edition
Next Improvement:High-Level Languages! MANY machine language statements One high-level language statement = Programming Languages, Third Edition
High-Level Languages • higher level of abstraction This: VAR2 = VAR1 + 25 Beats This: MOV AL, VAR1 ADD AL, 25 MOV VAR2, AL Programming Languages, Third Edition
High-Level Languages • Programs are portable • Same program can be translated into the machine code of many different computers by using different translator programs Programming Languages, Third Edition
Some Legendary Languages Programming Languages, Third Edition
FORTRAN and Algebraic Notation • FORmulaTRANslation language • Developed by John Backus in the early 1950s • Lacked the structured control statements and data structures of later high-level languages • Designed with one computer in mind (IBM 704) which dictated some of its syntax • Primary goals efficiency and acceptance • Popular with scientists and engineers for its support for algebraic notation and floating-point numbers • Sample FORTRAN code : http://en.wikibooks.org/wiki/Fortran/Fortran_examples Programming Languages, Third Edition
The ALGOL Family • ALGOrithmic Language released in 1960 • Unlike FORTRAN, machine independent • Included structured control statements for sequencing (begin-end blocks), loops (for loop), and selection (if and if-else statements) • Supported different numeric types • Introduced the array structure • Supported procedures, including recursive procedures • Sample ALGOL code: http://en.wikipedia.org/wiki/ALGOL_60 Programming Languages, Third Edition
The ALGOL Family (cont’d.) • ALGOL was the first language to receive a formal specification or definition • Included a BNF grammar that defined its features for both programmers and for compiler writers • Large number of high-level languages descended from ALGOL, including: • Pascal: language for teaching programming in the 1970s • Ada: for embedded applications of U.S. Dept. of Defense Programming Languages, Third Edition
COBOL • COmmon Business-Oriented Language • Designed for “data processing” around 1960 • Natural language readability • Machine-independent / portable • “record” data structure • File handling features • Required language on DOD computers at one time • Standardized • Grace Murray Hopper – key designer / legend • Sample COBOL code: http://people.sju.edu/~jhodgson/cobol/sample.html Programming Languages, Third Edition
C and C++ • C developed at Bell Telephone Labs in late 60’s – early 70’s • For systems programming • “high-level” replacement for assembly language – sort of the “best of both worlds” • Although Unix op sys originally written in assembly language, was later written in C • C++ also developed at Bell Labs – late 70’s – 80’s • Essentially C with object-oriented features (classes) Programming Languages, Third Edition
BASIC • Beginner’s All-purpose Symbolic Instruction Code • Developed in late 60’s • For time-sharing systems • For “beginners” – easy to learn • Interactive / Interpreted • Sample BASIC code: http://en.wikipedia.org/wiki/BASIC Programming Languages, Third Edition
Pascal • Developed by Nicklaus Wirth in late 1960’s • Named for famous mathematician / philosopher Blaise Pascal • Conceptually simpler successor to ALGOL 60 • Popular as a teaching language in late 70’s - 80’s • Control structures reflect notion of “structured programming” – algorithms only require 3 fundamental logic patterns • Sequence • Selection • Iteration (repetition or loops) • Sample Pascal code: http://en.wikipedia.org/wiki/Turbo_Pascal
Ada • Developed by DOD in late 70’s – early 80’s • Named for Ada Lovelace (daughter of poet Lord Byron) – corresponded with Charles Babbage and wrote “programs” for his Analytical Engine and is known as “world’s first computer programmer” • For “embedded systems” – computers built into other machines – previously programmed in assembly language • Concurrency constructs • Sample Ada code: http://sandbox.mc.edu/~bennet/ada/examples/f2_adb.html
“Real” Programmers Real Programmers Don't Write Specs Programming Languages, Third Edition