SlideShare a Scribd company logo
Programming Language
Concepts
Lecture 1- By Sadaf
What is a Programming Language ?
 A programming language is a set of rules that provides a way of
telling a computer what operations to perform.
A Programming language is a tool for developing executable
models for a class of problem domains.
Syntax, Semantics and Pragmatics
 Syntax:
Structure of Programs (tokens, keywords, statements)
 Semantics:
What are meant by programs.
 Pragmatics:
Language Paradigms
 Imperative/ Procedural Languages
 Applicative/ Functional Languages
 Rule-based / Declarative Languages
 Object-Oriented Languages
Imperative/ Procedural Languages
 Statement Oriented languages that change machine state
EX: (C, Pascal, FORTRAN, COBOL)
 Computation: a sequence of machine states(contents of memory)
Syntax: S1, S2, S3,… where S1, S2,… are statements
Imperative/ Procedural Languages
 Imperative programs emphasize “tell what to do”
 They focus on evaluating expressions and storing results in a variable.
 The most common imperative language consists of statements such as :
a=10;
b= 5;
c=a + b;
Applicative/ Functional Languages
 Programming consists of building the function that computes the answer
EX: (ML, LISP)
 Computation: Function Composition is major operation
Syntax: F1(F2(F3(X))) where F1, F2,F3 are functions and X is data.
Rule-Based / Declarative Languages
 Computation: Actions are specified by rules that check for the presence of
certain enabling conditions. EX (Prolog)
 The order of execution is determined by the enabling conditions, not by
the order of the statements.
Syntax: Condition Action
Object-Oriented Languages
 Imperative languages that merge applicative design with imperative
statements.
Ex: (java, C++, Smalltalk)
Syntax: set of objects (classes) containing data (imperative concepts) and
methods (applicative concepts)
Different Types of Programming Domains
 Scientific applications
 Business applications
 Artificial intelligence
 Scripting languages
 Systems Programming
Programming Domains (Cont.’…)
 Scientific applications
-Large number of floating point computations
-Ex: Fortran
 Business applications
-Produce reports, use decimal numbers and characters
- Ex: COBOL
Programming Domains (Cont.’…)
 Artificial intelligence
-Symbols rather than number manipulated
-Ex: LISP
 Systems Programming
-Need efficiency because of continuous use
- Ex: C
Programming Domains (Cont.’…)
 Scripting Languages
-Eclectic collection of languages : markup (e.g., XHTML), scripting
(e.g., PHP), general-purpose (e.g., Java)
Criteria for Language Evaluation
 Readability :the ease with which programs can be read and
understood
 Writeability :the ease with which a language can be used to create
programs.
 Reliability :conformance to specifications (i.e., performs to its
specifications)
 Cost : the ultimate total cost
Criteria for Language Evaluation (Cont..)
 Readability
o Overall simplicity “Strongly affects readability”
-Too many features make the language difficult to learn.
Programmers tend to learn a subsets of the language and ignore its other
features. Ex. ALGOL 60
- Multiplicity of features is also a complicating characteristics
“having more than one way to accomplish a particular operation. Ex. Java
Criteria for Language Evaluation (Cont..)
 Readability
o Orthogonality
-Makes the language easy to learn and read.
- Meaning is context independent. Pointers should be able to point to
any type of variable or data structure.
Criteria for Language Evaluation (Cont..)
 Readability
o Control Statements
-It became widely recognized that indiscriminate use of goto statements
severely reduced program readability.
- Basic and Fortran in the early 70s lacked the control statements that
allow strong restrictions on the use of gotos, so writing highly readable
programs in those languages was difficult.
Criteria for Language Evaluation (Cont..)
 Readability
o Control Statements
-Since then, languages have included sufficient control structures.
- The control statement design of a language is now a less important
factor in readability that it was in the past.
Criteria for Language Evaluation (Cont..)
 Readability
o Data Types and structures
-The presence of adequate facilities for defining data types and
structures in a language is another significant aid to reliability.
- Ex: Boolean type.
• timeout =1 or
• timeout=true
Criteria for Language Evaluation (Cont..)
 Readability
o Syntax Considerations
-The syntax of the elements of a language has a significant effect on
readability.
-Identifier forms: Restricting identifiers to very short length detracts from
readability. ANSI BASIC(1978) an identifier could consist only of a single
letter followed by a single digit.
Criteria for Language Evaluation (Cont..)
 Writability
-It is a measure of how easily a language can be used to create programs
for a chosen problem domain
- Most of the language characteristics that affect readability also affect
writability.
Criteria for Language Evaluation (Cont..)
 Writability
o Support for abstraction
-The ability to define and use complex structures or operations in ways
that allow details to be ignored.
-
Criteria for Language Evaluation (Cont..)
 Writability
o Simplicity and Orthogonality
-A smaller number of primitive constructs and a consistent set of rules
for combining them is much better than simply having a large number of
primitives.
Criteria for Language Evaluation (Cont..)
 Reliability
o Type checking
-is simply testing for type errors in a given program, either by the
compiler or during program execution.
o Exception handling
-the ability to intercepts run-time errors, take corrective measures, and
then continue is a great aid to reliability.
Criteria for Language Evaluation (Cont..)
 Cost
o Training programmers to use language.
o Compiling Programs
o Maintaining Programs
o Language implementation system: availability of free compilers
o Reliability: poor reliability leads to high costs.

More Related Content

PPT
8505548.ppt
PDF
Principles of programming languages .pdf
PPTX
CSCorganization of programming languages
PPT
Programming language design and implemenation
PPT
lect1-introductiontoprogramminglanguages-130130013038-phpapp02.ppt
PPT
software principle programming language
PPT
Python and principle of programming language.ppt
PPT
Programming Language Introduction Lecture
8505548.ppt
Principles of programming languages .pdf
CSCorganization of programming languages
Programming language design and implemenation
lect1-introductiontoprogramminglanguages-130130013038-phpapp02.ppt
software principle programming language
Python and principle of programming language.ppt
Programming Language Introduction Lecture

Similar to Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx (20)

PPTX
Chapter 1
PDF
concepts-in-programming-languages-2kuots4121.pdf
PPTX
unit-1(ppl notes) programing for problem.pptx
PPTX
Advanced Programming practices - UNIT 1 .pptx
PPTX
Unit1 principle of programming language
PPT
Ppl 13 july2019
PDF
Principles of-programming-languages-lecture-notes-
PDF
Principles of Programming Languages - Lecture Notes
PPT
English de lenguaje de programacion
PDF
Computer programing 111 lecture 1
PPTX
Introduction To Computer Programming
PPT
week1.ppt
PPTX
Unit 1_Evaluation Criteria_session 3.pptx
PPT
Introduction to high level Computer programming
PPTX
Lec.01-03.pptx for object oriented programming language
PPTX
Chapter 1: Theory of programming languages
PPTX
java programming for students UNIT 1.pptx
PPTX
Programming.language
PPT
1.2 Evaluation of PLs.ppt
PDF
Advanced Programming Paradigm Introduction.pdf
Chapter 1
concepts-in-programming-languages-2kuots4121.pdf
unit-1(ppl notes) programing for problem.pptx
Advanced Programming practices - UNIT 1 .pptx
Unit1 principle of programming language
Ppl 13 july2019
Principles of-programming-languages-lecture-notes-
Principles of Programming Languages - Lecture Notes
English de lenguaje de programacion
Computer programing 111 lecture 1
Introduction To Computer Programming
week1.ppt
Unit 1_Evaluation Criteria_session 3.pptx
Introduction to high level Computer programming
Lec.01-03.pptx for object oriented programming language
Chapter 1: Theory of programming languages
java programming for students UNIT 1.pptx
Programming.language
1.2 Evaluation of PLs.ppt
Advanced Programming Paradigm Introduction.pdf
Ad

Recently uploaded (20)

PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
LDMMIA Reiki Yoga Workshop 15 MidTerm Review
PPTX
Onica Farming 24rsclub profitable farm business
PPTX
Software Engineering BSC DS UNIT 1 .pptx
PDF
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
English Language Teaching from Post-.pdf
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PDF
From loneliness to social connection charting
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
PDF
High Ground Student Revision Booklet Preview
PDF
Sunset Boulevard Student Revision Booklet
PPTX
How to Manage Bill Control Policy in Odoo 18
PPTX
IMMUNIZATION PROGRAMME pptx
PPTX
Introduction and Scope of Bichemistry.pptx
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
LDMMIA Reiki Yoga Workshop 15 MidTerm Review
Onica Farming 24rsclub profitable farm business
Software Engineering BSC DS UNIT 1 .pptx
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
English Language Teaching from Post-.pdf
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
From loneliness to social connection charting
O7-L3 Supply Chain Operations - ICLT Program
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
High Ground Student Revision Booklet Preview
Sunset Boulevard Student Revision Booklet
How to Manage Bill Control Policy in Odoo 18
IMMUNIZATION PROGRAMME pptx
Introduction and Scope of Bichemistry.pptx
Open Quiz Monsoon Mind Game Final Set.pptx
Open Quiz Monsoon Mind Game Prelims.pptx
Ad

Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx

  • 2. What is a Programming Language ?  A programming language is a set of rules that provides a way of telling a computer what operations to perform. A Programming language is a tool for developing executable models for a class of problem domains.
  • 3. Syntax, Semantics and Pragmatics  Syntax: Structure of Programs (tokens, keywords, statements)  Semantics: What are meant by programs.  Pragmatics:
  • 4. Language Paradigms  Imperative/ Procedural Languages  Applicative/ Functional Languages  Rule-based / Declarative Languages  Object-Oriented Languages
  • 5. Imperative/ Procedural Languages  Statement Oriented languages that change machine state EX: (C, Pascal, FORTRAN, COBOL)  Computation: a sequence of machine states(contents of memory) Syntax: S1, S2, S3,… where S1, S2,… are statements
  • 6. Imperative/ Procedural Languages  Imperative programs emphasize “tell what to do”  They focus on evaluating expressions and storing results in a variable.  The most common imperative language consists of statements such as : a=10; b= 5; c=a + b;
  • 7. Applicative/ Functional Languages  Programming consists of building the function that computes the answer EX: (ML, LISP)  Computation: Function Composition is major operation Syntax: F1(F2(F3(X))) where F1, F2,F3 are functions and X is data.
  • 8. Rule-Based / Declarative Languages  Computation: Actions are specified by rules that check for the presence of certain enabling conditions. EX (Prolog)  The order of execution is determined by the enabling conditions, not by the order of the statements. Syntax: Condition Action
  • 9. Object-Oriented Languages  Imperative languages that merge applicative design with imperative statements. Ex: (java, C++, Smalltalk) Syntax: set of objects (classes) containing data (imperative concepts) and methods (applicative concepts)
  • 10. Different Types of Programming Domains  Scientific applications  Business applications  Artificial intelligence  Scripting languages  Systems Programming
  • 11. Programming Domains (Cont.’…)  Scientific applications -Large number of floating point computations -Ex: Fortran  Business applications -Produce reports, use decimal numbers and characters - Ex: COBOL
  • 12. Programming Domains (Cont.’…)  Artificial intelligence -Symbols rather than number manipulated -Ex: LISP  Systems Programming -Need efficiency because of continuous use - Ex: C
  • 13. Programming Domains (Cont.’…)  Scripting Languages -Eclectic collection of languages : markup (e.g., XHTML), scripting (e.g., PHP), general-purpose (e.g., Java)
  • 14. Criteria for Language Evaluation  Readability :the ease with which programs can be read and understood  Writeability :the ease with which a language can be used to create programs.  Reliability :conformance to specifications (i.e., performs to its specifications)  Cost : the ultimate total cost
  • 15. Criteria for Language Evaluation (Cont..)  Readability o Overall simplicity “Strongly affects readability” -Too many features make the language difficult to learn. Programmers tend to learn a subsets of the language and ignore its other features. Ex. ALGOL 60 - Multiplicity of features is also a complicating characteristics “having more than one way to accomplish a particular operation. Ex. Java
  • 16. Criteria for Language Evaluation (Cont..)  Readability o Orthogonality -Makes the language easy to learn and read. - Meaning is context independent. Pointers should be able to point to any type of variable or data structure.
  • 17. Criteria for Language Evaluation (Cont..)  Readability o Control Statements -It became widely recognized that indiscriminate use of goto statements severely reduced program readability. - Basic and Fortran in the early 70s lacked the control statements that allow strong restrictions on the use of gotos, so writing highly readable programs in those languages was difficult.
  • 18. Criteria for Language Evaluation (Cont..)  Readability o Control Statements -Since then, languages have included sufficient control structures. - The control statement design of a language is now a less important factor in readability that it was in the past.
  • 19. Criteria for Language Evaluation (Cont..)  Readability o Data Types and structures -The presence of adequate facilities for defining data types and structures in a language is another significant aid to reliability. - Ex: Boolean type. • timeout =1 or • timeout=true
  • 20. Criteria for Language Evaluation (Cont..)  Readability o Syntax Considerations -The syntax of the elements of a language has a significant effect on readability. -Identifier forms: Restricting identifiers to very short length detracts from readability. ANSI BASIC(1978) an identifier could consist only of a single letter followed by a single digit.
  • 21. Criteria for Language Evaluation (Cont..)  Writability -It is a measure of how easily a language can be used to create programs for a chosen problem domain - Most of the language characteristics that affect readability also affect writability.
  • 22. Criteria for Language Evaluation (Cont..)  Writability o Support for abstraction -The ability to define and use complex structures or operations in ways that allow details to be ignored. -
  • 23. Criteria for Language Evaluation (Cont..)  Writability o Simplicity and Orthogonality -A smaller number of primitive constructs and a consistent set of rules for combining them is much better than simply having a large number of primitives.
  • 24. Criteria for Language Evaluation (Cont..)  Reliability o Type checking -is simply testing for type errors in a given program, either by the compiler or during program execution. o Exception handling -the ability to intercepts run-time errors, take corrective measures, and then continue is a great aid to reliability.
  • 25. Criteria for Language Evaluation (Cont..)  Cost o Training programmers to use language. o Compiling Programs o Maintaining Programs o Language implementation system: availability of free compilers o Reliability: poor reliability leads to high costs.