programming languages the study of programming languages

19
PROGRAMMING LANGUAGES • The Study of Programming Languages

Upload: lewis-prosper-oliver

Post on 25-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PROGRAMMING LANGUAGES The Study of Programming Languages

PROGRAMMING LANGUAGES

• The Study of Programming Languages

Page 2: PROGRAMMING LANGUAGES The Study of Programming Languages

OBJECTIVES

At the end of the lesson, the student must be able to:

1.Define what is programming language2.Identify the reasons of studying programming

language3.Identify the history of programming languages4.Determine the criteria for a good p.l.

Page 3: PROGRAMMING LANGUAGES The Study of Programming Languages

PROGRAMMING LANGUAGE• Any notation for the description of algorithms and data structures

• Requires that programming language is implemented on computers

• A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication. (Wikipedia

EX. PASCAL, C, JAVA, C++, VISUAL BASIC, ADA, LISP, FORTRAN, COBOL, PROLOGUE

Page 4: PROGRAMMING LANGUAGES The Study of Programming Languages

WHY STUDY PROGRAMMING LANGUAGES?

1. To improve your understanding of the language you are using.– Many languages provide features when used

properly are of benefit to the programmer but when used improperly may waste large amounts of computer time or lead the programmer into time-consuming logical errors.

Ex. Use of array and single variable data storage

Page 5: PROGRAMMING LANGUAGES The Study of Programming Languages

WHY STUDY PROGRAMMING LANGUAGES?

2. To increase your vocabulary of useful programming constructs.– Language or the syntaxes/commands aid the

programmer to implement the logic of the program– In searching for the data and program structures suitable

to the solution of a problem, one tends to think only of structures that are immediately expressible in the languages with which one is familiar.

– By studying the constructs provided by the wide range of languages and the manner in which these constructs are implemented, the programmer increases his programming “vocabulary”.

Page 6: PROGRAMMING LANGUAGES The Study of Programming Languages

WHY STUDY PROGRAMMING LANGUAGES?

3. To allow better choice of programming language

Ex. C and Java4. To make it easier to learn a new language

-A thorough knowledge of a variety of programming language constructs and implementation techniques allows the programmer to learn constructs and implementation techniques allows the programmer to learn a new language more easily when the need arises

Page 7: PROGRAMMING LANGUAGES The Study of Programming Languages

WHY STUDY PROGRAMMING LANGUAGES?

5. To make it easier to design a new language– The user interface can be designed by a programmer

if he has a thorough knowledge of the p.l.– The user interface consists of the commands and

data formats that are provided for the user to communicate with the program

– The aspect of program design is often simplified if the programmer is familiar with a variety of constructs and implementation methods from ordinary programming languages.

Page 8: PROGRAMMING LANGUAGES The Study of Programming Languages

INFLUENCES ON THE EVOLUTIONOF LANGUAGE DESIGNS

1. COMPUTER HARDWARE AND OPERATING SYSTEM– Evolved from small, slow, and costly vacuum-

tube machines to microcomputers.– At the same time, layers of microprogram and

operating system software have been inserted between the programming language and the underlying computer hardware. This factors have influenced both the structure and the cost of using the features of high-level languages.

Page 9: PROGRAMMING LANGUAGES The Study of Programming Languages

INFLUENCES ON THE EVOLUTIONOF LANGUAGE DESIGNS

2. Applications-from the original concentration on critical, military,

scientific, business, and industrial applications in the 1950’s to educational, entertainment and other applications in the area of human activities seen today.

- The requirements of these new application areas affect the designs of new languages and the revisions and extensions of older ones.

Page 10: PROGRAMMING LANGUAGES The Study of Programming Languages

INFLUENCES ON THE EVOLUTIONOF LANGUAGE DESIGNS

3. PROGRAMMING METHODS– Language designs have evolved to reflect our

changing understanding of good methods for writing large and complex programs and to reflect the changing environment in which programming is done.

Page 11: PROGRAMMING LANGUAGES The Study of Programming Languages

INFLUENCES ON THE EVOLUTIONOF LANGUAGE DESIGNS

5. THEORETICAL STUDIES– Research into the conceptual foundations for

language designs and implementations, using formal mathematical methods, has deepened our understanding of the strengths and weaknesses of language features and has thus influenced the inclusion of these features in new language designs

Page 12: PROGRAMMING LANGUAGES The Study of Programming Languages

INFLUENCES ON THE EVOLUTIONOF LANGUAGE DESIGNS

6.Standardization. - the need for “standard” language that can be implemented easily on a variety of computer systems and that allow programs to be transported from one computer to another has provided strong conservative influence on the evolution of language history

Page 13: PROGRAMMING LANGUAGES The Study of Programming Languages

WHAT MAKES A GOOD LANGUAGE?1. Clarity, simplicity, and unity of language concept– PL’s provides both the conceptual framework for

thinking about algorithms and a means of expressing those algorithms for machine execution

– The language should be an aid to the programmer before he reaches the actual coding stage in programming.

– It should provide him with clear, simple, and unified set of concepts that he can use as primitives in developing algorithms

– It is desirable to have a minimum number of different concepts, with the rules for their combination being as simple and regular as possible

Page 14: PROGRAMMING LANGUAGES The Study of Programming Languages

WHAT MAKES A GOOD LANGUAGE?2. Clarity of program syntax.– Syntax greatly affects the ease with which the

program may be written, tested , and later understood and modified.

– Some syntaxes are easy to write but difficult to be modified

– It is important that a syntax is not misleading or must be error-prone to reflect the underlying logical structure of the algorith

– Structured and object oriented programming languages are easy to implement and understand compared to the first generation languages

Page 15: PROGRAMMING LANGUAGES The Study of Programming Languages

WHAT MAKES A GOOD LANGUAGE?3. NATURALNESS OF APPLICATIONS.- The language should provide appropriate

data structures, operations, control structures, and a natural proliferation of languages is just this need for naturalness

Page 16: PROGRAMMING LANGUAGES The Study of Programming Languages

WHAT MAKES A GOOD LANGUAGE?4. SUPPORT FOR ABSTRACTION– There is always a gap remaining between the

abstract data structures and operations that characterize the solution to a problem and the particular primitive data structures and operations built into a language.

– The language should allow data structures, data types, and operations to be defined and maintained as self-contained abstraction, so the programmer may use them in other parts of the program knowing only their abstract properties, without concern for the details of their implementations.

Page 17: PROGRAMMING LANGUAGES The Study of Programming Languages

What Makes a GOOD LANGUAGE?5.PROGRAMMING ENVIRONMENT– The technical structure of the programming

language is only one aspect affecting its utility– The presence of a programming environment

may make a programming language easier to work than a stronger language that has little external support

Ex. compilers, text editors and other utilities for the pl’s must be available.

-other pl’s are licensed while others are for free

Page 18: PROGRAMMING LANGUAGES The Study of Programming Languages

WHAT MAKES A GOOD LANGUAGE?6. PORTABILITY OF THE PL.7. COST OF USE

1. COST OF PROGRAM EXECUTION2. COST OF PROGRAM TRANSLATION3. COST OF PROGRAM CREATION,TESTING, AND

USE4. COST OF PROGRAM MAINTENANCE

Page 19: PROGRAMMING LANGUAGES The Study of Programming Languages

Read/study

• PL PROCESSORS– STRUCTURE AND OPERATIONS OF A COMPUTER– TRANSLATORS AND SOFTWARE SIMULATED

COMPUTERS– SEMANTICS AND SYNTAX AND ITS

IMPLEMENTATIONS