SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Programming Languages
Lecture 1
Naveen Kumar
The Study of Programming Languages
 The purpose of language is simply that it
must convey meaning (Confucius)
 Whatever can be said, can be said clearly
(Wittgenstein,1963)
 A programming language is a notation for
writing programs (Sethi,89)
– program is a specification of a computation.2
What is a programming language?
 A language that is intended for the
expression of computer programs and
 that is capable of expressing any computer
program
3
Computer program is a specification of a computation.
What is Programming Language
4
ComputerProgram
Programming
Language
Output
use
giveswriteUser
executes
Problem
takes
A short history of programming
Languages
 Early languages:
– Numerically based languages. (FORTRAN:55,ALGOL:58)
– Business languages. (COBOL:60)
– Artificial intelligence languages. (LISP,Prolog)
– Systems languages. (C:70)
 1950 : LISP, FORTRAN, COBOL, ALGOL60, BASIC
 1970 : Ada, C, Pascal, Prolog
 1980 : C++
 1990 : Delphi, Perl
 1996 : Java by James Gosling (at SUN Micro Systems)5
Attributes of a good language
 Clarity and simplicity
– Readability
 Naturalness for the application
 Ease of program verification
– Proof of correctness, test
– Simplicity of semantic and syntax
 Portability of programs
 Cost of use
– Program execution
– Program translation
– Program creation, testing, and use
– Program maintenance6
Programming Methodology
Kind of approach to solve different problems
 How should programs be designed?
 How should programs be structured?
Programming Methodologies Influences
 1950s and early 1960s: Simple applications; worry
about machine efficiency
 Late 1960s: People efficiency became important;
readability, better control structures
– structured programming
– top-down design
 Late 1970s: Process-oriented (Goal or.) to data-oriented
(DB or.)
– data abstraction
 Middle 1980s: Object-oriented programming
– Data abstraction + inheritance + polymorphism
Kinds of Programming Methodology
 Unstructured programming
 Procedural/Process oriented programming
– Modular programming
 Object-oriented programming
Unstructured Programming
 Direct code (step)
Ex: Assembly Language
Adv.
 speed (written in assembly)
Disadv.
 No re-usability
 Statements written many times
 As code increases, complexity increases
– Hard to manage large programs
– Hard to debug
Procedural oriented Programming
 Top-down approach
 Procedure (Function) are building block
 De-allocation problem (memory leak: memory allocated
but not used)
 Un- initialized Variables (rand value assigned)
Ex: Calculator → scientific
→ non-scientific → float
→ int → add.
→ subs.
→ mult.
→ div.
Ex: C - language
Small
functions
Procedural oriented Programming
 Adv:
– Re-usability
– Easy to debug
 Disadv:
– Concentrate on what we want to do, not on who will use it
– Data does not have a owner (sharing)
– All functions are global
– No data security
 Ex: let there are three functions a(),b() and c(). Data d is used by
a() and b() but how to restrict from c() [data will be either global
or local]
– No data integrity [Stack:{push,pop},Queue:{enque, deque}]
 How to distinguish which fun associated with which data
structure
Object-Oriented Programming
Keep large software projects manageable by
human programmers
 Bottom-up approach (user oriented)
 Objects are building block
An Example
 Everything in OOP is grouped as self sustainable
"objects".
 let’s take your “hand” as an example.
– Your body has two objects of type hand, named left hand and
right hand. Their main functions are controlled/ managed by a
set of electrical signals sent through your shoulders
– So the shoulder is an interface which your body uses to interact
with your hands.
– The hand is being re-used to create the left hand and the right
hand by slightly changing the properties of it.
14
Another Example
 Ex: college (Student, Faculty, Admin)
Student (take course, write exam, view indv. result)
Faculty (set paper, prepare result, view results)
Admin (student admission, staff/faculty selection)
15
Why OOP?
Modularization
 Decompose problem into smaller
subproblems that can be solved separately.
16
Why OOP?
Abstraction -- Understandability
 Individual modules are understandable by
human readers.
17
Why OOP?
 Encapsulation -- Information Hiding
 Hide complexity from the user of a software.
Protect low-level functionality.
18
Why OOP?
 Composability -- Structured Design
 Interfaces allow to freely combine modules to
produce new systems.
19
Why OOP?
 Hierarchy
 Incremental development from small and
simple to more complex modules.
20
Complexity
increases
Why OOP?
 Continuity
 Changes and maintenance in only a few
modules does not affect the architecture.
21
Main OOP Language Features
 Classes: Modularization, structure.
 Inheritance / extends: Hierarchy of modules,
incremental development.
 Public / Protected / Private: Encapsulation.
 Interfaces / Abstract Classes: Composability.
 Polymorphism / virtual: Hierarchy of modules,
incremental development.
 Templates: Type independent abstract data
types.22

Mais conteúdo relacionado

Mais procurados

Untitled 1
Untitled 1Untitled 1
Untitled 1
lexsyn
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmer
Busayo Oyebisi
 
Programming languages
Programming languagesProgramming languages
Programming languages
Akash Varaiya
 
Lang generations 7557_syed_ghazanfarnaqvi_saturday
Lang generations 7557_syed_ghazanfarnaqvi_saturdayLang generations 7557_syed_ghazanfarnaqvi_saturday
Lang generations 7557_syed_ghazanfarnaqvi_saturday
Syed Naqvi
 

Mais procurados (19)

Need of OOPs and Programming,pop vs oop
Need of OOPs and Programming,pop vs oopNeed of OOPs and Programming,pop vs oop
Need of OOPs and Programming,pop vs oop
 
Computer Programming: Chapter 1
Computer Programming: Chapter 1Computer Programming: Chapter 1
Computer Programming: Chapter 1
 
Relation between Languages, Machines and Computations
Relation between Languages, Machines and ComputationsRelation between Languages, Machines and Computations
Relation between Languages, Machines and Computations
 
Generations of programming language
Generations of programming languageGenerations of programming language
Generations of programming language
 
Untitled 1
Untitled 1Untitled 1
Untitled 1
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmer
 
Java@intro to programming
Java@intro to programmingJava@intro to programming
Java@intro to programming
 
cv
cvcv
cv
 
What is programming what are its benefits
What is programming  what are its benefits What is programming  what are its benefits
What is programming what are its benefits
 
Programming languages ms harsha
Programming languages ms harshaProgramming languages ms harsha
Programming languages ms harsha
 
Senjuti Kundu - Resume
Senjuti Kundu - ResumeSenjuti Kundu - Resume
Senjuti Kundu - Resume
 
programing laugauge
programing laugaugeprograming laugauge
programing laugauge
 
object oriented programming(oops)
object oriented programming(oops)object oriented programming(oops)
object oriented programming(oops)
 
Introduction to programming c
Introduction to programming cIntroduction to programming c
Introduction to programming c
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
 
Chapter no 1
Chapter no 1Chapter no 1
Chapter no 1
 
Lang generations 7557_syed_ghazanfarnaqvi_saturday
Lang generations 7557_syed_ghazanfarnaqvi_saturdayLang generations 7557_syed_ghazanfarnaqvi_saturday
Lang generations 7557_syed_ghazanfarnaqvi_saturday
 
Allganize AI seminar - GPT3 and PET
Allganize AI seminar - GPT3 and PETAllganize AI seminar - GPT3 and PET
Allganize AI seminar - GPT3 and PET
 

Semelhante a Lec 1 25_jul13

Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
farhan amjad
 

Semelhante a Lec 1 25_jul13 (20)

Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
PCCF UNIT 2.pptx
PCCF UNIT 2.pptxPCCF UNIT 2.pptx
PCCF UNIT 2.pptx
 
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptx
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
 
structured programming Introduction to c fundamentals
structured programming Introduction to c fundamentalsstructured programming Introduction to c fundamentals
structured programming Introduction to c fundamentals
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
Intro1
Intro1Intro1
Intro1
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
 
OOP Java
OOP JavaOOP Java
OOP Java
 
Threads presentation
Threads presentationThreads presentation
Threads presentation
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docx
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
 
Java seminar
Java seminarJava seminar
Java seminar
 
PCCF-UNIT 2-1 new.docx
PCCF-UNIT 2-1 new.docxPCCF-UNIT 2-1 new.docx
PCCF-UNIT 2-1 new.docx
 
PCCF Unit 2.pptx
PCCF Unit 2.pptxPCCF Unit 2.pptx
PCCF Unit 2.pptx
 
Programming
ProgrammingProgramming
Programming
 
Java
JavaJava
Java
 

Mais de Palak Sanghani

Mais de Palak Sanghani (20)

Survey form
Survey formSurvey form
Survey form
 
Survey
SurveySurvey
Survey
 
Nature2
Nature2Nature2
Nature2
 
Texture
TextureTexture
Texture
 
Lec 11 12_sept [compatibility mode]
Lec 11 12_sept [compatibility mode]Lec 11 12_sept [compatibility mode]
Lec 11 12_sept [compatibility mode]
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]
 
Lec 8 03_sept [compatibility mode]
Lec 8 03_sept [compatibility mode]Lec 8 03_sept [compatibility mode]
Lec 8 03_sept [compatibility mode]
 
Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]
 
Lec 10 10_sept [compatibility mode]
Lec 10 10_sept [compatibility mode]Lec 10 10_sept [compatibility mode]
Lec 10 10_sept [compatibility mode]
 
Lec 6 14_aug [compatibility mode]
Lec 6 14_aug [compatibility mode]Lec 6 14_aug [compatibility mode]
Lec 6 14_aug [compatibility mode]
 
Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]Lec 4 06_aug [compatibility mode]
Lec 4 06_aug [compatibility mode]
 
Lec 3 01_aug13
Lec 3 01_aug13Lec 3 01_aug13
Lec 3 01_aug13
 
Lec 2 30_jul13
Lec 2 30_jul13Lec 2 30_jul13
Lec 2 30_jul13
 
Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]Lec 5 13_aug [compatibility mode]
Lec 5 13_aug [compatibility mode]
 
Nature
NatureNature
Nature
 
Comparisionof trees
Comparisionof treesComparisionof trees
Comparisionof trees
 
My Structure Patterns
My Structure PatternsMy Structure Patterns
My Structure Patterns
 
My Similarity Patterns
My Similarity PatternsMy Similarity Patterns
My Similarity Patterns
 
My Radiation Patterns
My Radiation PatternsMy Radiation Patterns
My Radiation Patterns
 
My Gradation Patterns
My Gradation PatternsMy Gradation Patterns
My Gradation Patterns
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Lec 1 25_jul13

  • 2. The Study of Programming Languages  The purpose of language is simply that it must convey meaning (Confucius)  Whatever can be said, can be said clearly (Wittgenstein,1963)  A programming language is a notation for writing programs (Sethi,89) – program is a specification of a computation.2
  • 3. What is a programming language?  A language that is intended for the expression of computer programs and  that is capable of expressing any computer program 3 Computer program is a specification of a computation.
  • 4. What is Programming Language 4 ComputerProgram Programming Language Output use giveswriteUser executes Problem takes
  • 5. A short history of programming Languages  Early languages: – Numerically based languages. (FORTRAN:55,ALGOL:58) – Business languages. (COBOL:60) – Artificial intelligence languages. (LISP,Prolog) – Systems languages. (C:70)  1950 : LISP, FORTRAN, COBOL, ALGOL60, BASIC  1970 : Ada, C, Pascal, Prolog  1980 : C++  1990 : Delphi, Perl  1996 : Java by James Gosling (at SUN Micro Systems)5
  • 6. Attributes of a good language  Clarity and simplicity – Readability  Naturalness for the application  Ease of program verification – Proof of correctness, test – Simplicity of semantic and syntax  Portability of programs  Cost of use – Program execution – Program translation – Program creation, testing, and use – Program maintenance6
  • 7. Programming Methodology Kind of approach to solve different problems  How should programs be designed?  How should programs be structured?
  • 8. Programming Methodologies Influences  1950s and early 1960s: Simple applications; worry about machine efficiency  Late 1960s: People efficiency became important; readability, better control structures – structured programming – top-down design  Late 1970s: Process-oriented (Goal or.) to data-oriented (DB or.) – data abstraction  Middle 1980s: Object-oriented programming – Data abstraction + inheritance + polymorphism
  • 9. Kinds of Programming Methodology  Unstructured programming  Procedural/Process oriented programming – Modular programming  Object-oriented programming
  • 10. Unstructured Programming  Direct code (step) Ex: Assembly Language Adv.  speed (written in assembly) Disadv.  No re-usability  Statements written many times  As code increases, complexity increases – Hard to manage large programs – Hard to debug
  • 11. Procedural oriented Programming  Top-down approach  Procedure (Function) are building block  De-allocation problem (memory leak: memory allocated but not used)  Un- initialized Variables (rand value assigned) Ex: Calculator → scientific → non-scientific → float → int → add. → subs. → mult. → div. Ex: C - language Small functions
  • 12. Procedural oriented Programming  Adv: – Re-usability – Easy to debug  Disadv: – Concentrate on what we want to do, not on who will use it – Data does not have a owner (sharing) – All functions are global – No data security  Ex: let there are three functions a(),b() and c(). Data d is used by a() and b() but how to restrict from c() [data will be either global or local] – No data integrity [Stack:{push,pop},Queue:{enque, deque}]  How to distinguish which fun associated with which data structure
  • 13. Object-Oriented Programming Keep large software projects manageable by human programmers  Bottom-up approach (user oriented)  Objects are building block
  • 14. An Example  Everything in OOP is grouped as self sustainable "objects".  let’s take your “hand” as an example. – Your body has two objects of type hand, named left hand and right hand. Their main functions are controlled/ managed by a set of electrical signals sent through your shoulders – So the shoulder is an interface which your body uses to interact with your hands. – The hand is being re-used to create the left hand and the right hand by slightly changing the properties of it. 14
  • 15. Another Example  Ex: college (Student, Faculty, Admin) Student (take course, write exam, view indv. result) Faculty (set paper, prepare result, view results) Admin (student admission, staff/faculty selection) 15
  • 16. Why OOP? Modularization  Decompose problem into smaller subproblems that can be solved separately. 16
  • 17. Why OOP? Abstraction -- Understandability  Individual modules are understandable by human readers. 17
  • 18. Why OOP?  Encapsulation -- Information Hiding  Hide complexity from the user of a software. Protect low-level functionality. 18
  • 19. Why OOP?  Composability -- Structured Design  Interfaces allow to freely combine modules to produce new systems. 19
  • 20. Why OOP?  Hierarchy  Incremental development from small and simple to more complex modules. 20 Complexity increases
  • 21. Why OOP?  Continuity  Changes and maintenance in only a few modules does not affect the architecture. 21
  • 22. Main OOP Language Features  Classes: Modularization, structure.  Inheritance / extends: Hierarchy of modules, incremental development.  Public / Protected / Private: Encapsulation.  Interfaces / Abstract Classes: Composability.  Polymorphism / virtual: Hierarchy of modules, incremental development.  Templates: Type independent abstract data types.22