Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
29 views

Characteristics of A Good Programming Language

Uploaded by

souviks.phd18.ec
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Characteristics of A Good Programming Language

Uploaded by

souviks.phd18.ec
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Characteristics of a Good

Programming Language
DR. SOUVIK SAHA
ASSISTANT PROFESSOR
AMITY INSTITUTE OF INFORMATION TECHNOLOGY KOLKATA
AMITY UNIVERSITY KOLKATA
Simplicity

 A good programming language must be simple and easy to learn and use.
 It should provide a programmer with a clear, simple, and unified set of concepts that can
be grasped easily.
 A portable programming language is always preferred.
 A programming language should be well structured and documented so that it is suitable
for application development.
 A programming language should provide a single environment known as Integrated
Development Environment(IDE).
Naturalness

 A good language should be natural for the application area for which it is designed.
 That is, it should provide appropriate operators, data structure, control structures, and a
natural syntax to facilitate programmers to code their problems easily and efficiently.
 FORTAN and COBOL are good examples of languages possessing high degree of
naturalness in scientific and business application areas, respectively.
Abstraction

 Abstraction means the ability to define and then use complicated structures or operations in
ways that allow many of the details to be ignored.
 The degree of abstraction allowed by a programming language directly affects its ease of
programming.
 For example, object- oriented languages support high degree of abstraction. Hence, writing
programs in object- oriented languages is much easier.
Efficiency

 Programs written in a good programming language are translated into machine code
efficiently, are executed efficiently, and acquire relatively less space in memory.
 That is, a good programming language is supposed with a good language translator (a
compiler or an interpreter) that gives due consideration to space and time efficiency.
Structured Programming Support

 A good programming language should have necessary features to allow programmers to


write their programs based on the concepts of structured programming.
 This property greatly affects the ease with which a program may be written, tested, and
maintained.
 Moreover, it forces a programmer to look at a problem in a logical way so that fewer
errors are created while writing a program for the problem.
Compactness

 In a good programming language, programmers should be able to express the intended


operations concisely without losing readability. Programmers generally do not like a
verbose language because they need to write too much.
 Many programmers dislike COBOL because it is verbose in nature (lacks compactness).
Concept of Problem solving

 It is the software developer who must write down the solution to the problem
in terms of simple operations which the computer can understand and execute.
 To solve a problem by the computer, one has to pass though certain stages or
steps.
 1. Understanding the problem
 2. Analysing the problem
 3. Developing the solution
 4. Coding and implementation.
Understanding the problem

 Try to understand the problem to be solved in totally.


 Before going to the next stage or step, we should be sure about the
objectives of the given problem.
 You need to know:
 What input data/information is available ?
 What does it represent ?
 What format is it in ?
 Is anything missing ?
 Do I have everything that I need ?
 What output information am I trying to produce ?
 What do I want the result to look like … text, a picture, a graph … ?
 What am I going to have to compute ?
Analysing the problem

 After understanding thoroughly, the problem to be solved, we look different


ways of solving the problem and evaluate each solution.
 The idea here is to search an appropriate solution to the problem under
consideration.
 The result of this stage is a broad overview of the sequence of operations that are
to be carries out to solve the given problem.
Analysing the problem

 In the example, we are going to compute the average of the incoming grades. So,
we need to know the model (or formula) for computing the average of a bunch
of numbers.
 If there is no such “formula”, we need to develop one.
 Often, however, the problem breaks down into simple computations that we can
understand easily.
Developing the solution

 Here the overview of the sequence of operations that was the result of analysis stage is expanded to
form a detailed step by step solution to the problem under consideration.
 This is done with the help of algorithm, pseudo code and flowcharts.
 Algorithm: Display Grades
 1. set the sum of the grade values to 0.
 2. load all grades x1 … xn from file.
 3. repeat n times
 {
 4. get grade xi
 5. add xi to the sum
 }
 6. compute the average to be sum / n.
 7. print the average.
Coding and implementation

 The last stage of the problem solving is the conversion of the detailed sequence of operations into
a language that the computer can understand.
 Here each step is converted to its equivalent instruction or instructions in the computer language that has
been chosen for the implantation.
 int sum = 0;
 byte[] x = loadBytes("numbers");
 for (int i=0; i<x.length; i++)
 sum = sum + x[i];
 int avg = sum / x.length;
 print(avg);
Program Design

 To produce an effective computer program, it is necessary to find the logical solution of a


problem and write every instruction in the correct sequence.
 However, the instruction sequence or the logic of the program may be very complex.
 Hence, before writing its code we must design the program.
 We can use many tools for the designing of a computer program.
 Some of the tools which can be used to design a program are Algorithm, flowchart, decision
table, pseudo code etc.
 During the designing process firstly, an algorithm is created then it is represented with the
help of flow charts, decision tables, pseudo code etc for easy understanding of the logic used
for solving the given problem and finally it is converted into a computer program.
Algorithm

 The term algorithm refers to the logic of the program. It is a step-by-step


description of how to arrive at a solution to a given problem.
 The characteristics of an Algorithm are as follow:
 1. Each instruction should be precise and unambiguous.
 2. No instruction should repeat infinitely.
 3. It should give the correct result at the end.
Algorithm

 Advantages of an algorithm
 1. It is a step-by-step representation of a solution to a given problem ,which is very easy to
understand.
 2. It has got a definite procedure.
 3. It is independent of programming language.
 4. It is easy to debug as every step got its own logical sequence.
 Disadvantages of an algorithm
 1. It is time consuming process.
 2. It is difficult to show branch and looping in the algorithm.

You might also like