0% found this document useful (0 votes)
33 views2 pages

Chapter 1 PL

1. The document discusses key criteria for evaluating programming languages, including readability, simplicity, orthogonality, support for abstraction, expressivity, reliability, and type checking. 2. It also examines common programming domains like scientific applications, business applications, artificial intelligence, and web software and which languages like Java, C, and C++ are best suited for each domain. 3. Finally, it provides examples of how characteristics like data types, syntax design, simplicity, abstraction, and error handling can impact a language's readability, writability, and reliability.

Uploaded by

am am cua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Chapter 1 PL

1. The document discusses key criteria for evaluating programming languages, including readability, simplicity, orthogonality, support for abstraction, expressivity, reliability, and type checking. 2. It also examines common programming domains like scientific applications, business applications, artificial intelligence, and web software and which languages like Java, C, and C++ are best suited for each domain. 3. Finally, it provides examples of how characteristics like data types, syntax design, simplicity, abstraction, and error handling can impact a language's readability, writability, and reliability.

Uploaded by

am am cua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter 1: PL – C++ is suitable when the primary concern is

the Object-Oriented features.


Reasons for Studying Concepts of Programming Languages
• C
Increased capacity to express ideas
– C is suitable when the primary concern is
- It is widely believed that the depth at which people can time/speed more than Object-Oriented
think is influenced by the expressive power of the features.
language
2. Business Application
Improved background for choosing appropriate languages
- need to be able to represent data in a human-
- Many professional programmers have had little formal understandable way, as well as need precise ways of
education in computer science; rather, they have describing and storing decimal numbers, and character
developed their programming skills independently or data.
through inhouse training programs.
3. Artificial Intelligence
Increased ability to learn new languages
- is a broad area of computer applications
- Computer programming is still a relatively young characterized by the use of symbolic rather than
discipline, and design methodologies, software numeric computations. Symbolic computation means
development tools, and programming languages are that symbols, consisting of names rather than
still in a state of continuous evolution. numbers, are manipulated.

Better understanding of the significance of implementation 4. Web Software

- In some cases, an understanding of implementation - World Wide Web is supported by an eclectic


issues leads to an understanding of why languages are collection of languages, ranging from markup
designed the way they are. languages, such as HTML, which is not a programming
language, to general-purpose programming languages,
Better use of languages that are already known
such as Java.
- By studying the concepts of programming languages,
Language Evaluation Criteria
programmers can learn about previously unknown and
unused parts of the languages they already use and - A set of evaluation criteria to evaluate each of the
begin to use those features. programming languages’ features, focusing on their
impact on the software development process,
Programming domain defines the ability to use a
including maintenance.
specific language for a specific usage.
Language evaluation criteria and the
Common programming domains:
characteristics that affect them
1. Scientific Applications
Readability
- use relatively simple data structures but required
large numbers of floating-point arithmetic - One of the most important criteria for judging a
computations. programming language is the ease with which
programs can be read and understood. The primary
Ex. arrays and matrices
positive characteristic of programming languages was
Comparison between Java, C, and C++ languages: efficiency.

• Java Overall simplicity

– Java’s floating point calculations are slow. - a programming language strongly affects its
readability. A language with large number of basic
– Java’s recompilation is slow due to constructs is more difficult to learn than one with a
extensive compile-time checking smaller number. Readability problems occur whenever
the program’s author has learned a different subset
– Java uses extra memory (overhead) for the from that subset with which the reader is familiar.
objects it creates, memory management,
and for the virtual machine itself. Orthogonality

• C++ - a programming language means that a relatively small


set of primitive constructs can be combined in a
– C++ compiler is a lot more complex than a C relatively small number of ways to build the control
compiler, and may run a bit slower. and data structures of the language.
Data Types - The ability of a program to intercept run-time errors
(as well as other unusual conditions detectable by the
- The presence of adequate facilities for defining data program), take corrective measures, and then continue
types and data structures in a language is another is an obvious aid to reliability.
significant aid to readability. For example, suppose a
numeric type is used for an indicator flag because Aliasing
there is no Boolean type in the language.
- Loosely defined, aliasing is having two or more distinct
Syntax Design names that can be used to access the same memory
cell. It is now widely accepted that aliasing is a
- The syntax, or form, of the elements of a language has dangerous feature in a programming language.
a significant effect on the readability of programs.
Following are some examples of syntactic design Readability and writability
choices that affect readability:
- It influence reliability. The easier a program is to write,
• Special words - Program appearance and thus program the more likely it is to be correct. Programs that are
readability are strongly influenced by the forms of a difficult to read are difficult both to write and to
language’s special words (for example, while, class, and modify.
for).

• Form and meaning - Designing statements so that


their appearance at least partially indicates their
purpose is an obvious aid to readability.

Writability

- 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.

Simplicity and Orthogonality

- If a language has large number of different constructs,


some programmers might not be familiar with all of
them. Therefore, a smaller number of primitive
constructs and a consistent set of rules for combining
them (that is, orthogonality) is much better than simply
having large number of primitives.

Support for Abstraction

- means the ability to define and then use complicated


structures or operations in ways that allow many of the
details to be ignored.

Expressivity

- Capability of a programming language to express the


solution of a problem in a clear, natural, intuitive, and
concise way.

Reliability

- A program is said to be reliable if it performs to its


specifications under all conditions.

Type checking

- is simply testing for type errors in a given program,


either by the compiler or during program execution.
Furthermore, the earlier errors in programs are
detected, the less expensive it is to make the required
repairs.

Exception Handling

You might also like