Selection and features of a programming language
Selection and features of a programming language
1. Simplicity: A good programming language must be simple and easy to learn and use.
It should provide a clear, simple, and agreeable set of concepts to a programmer that
they can grasp quickly.
The simplicity of a programming language also strongly affects the readability of the
programs. And also, programs that are easier to read and understand are easier to
maintain. Developing and implementing a compiler or an interpreter for a simple
programming language is also easy.
However, designers should not sacrifice the power needed for the language to achieve
simplicity.
2. Naturalness: A good language for an application area should be natural for
programming applications. It should provide appropriate operators, data structures,
control structures, and a natural syntax to facilitate programmers to code their
problems quickly and efficiently.
FORTRAN and COBOL are good examples of languages possessing a high degree of
naturalness in scientific and business application areas, respectively.
3. Abstraction: Abstraction means the ability to define and then use complicated
structures or operations in ways that allow programmers to ignore many of the details.
The degree of abstraction a programming language allows directly affects its ease of
programming.
For example, object-oriented languages support a high degree of abstraction. Hence,
writing programs in object-oriented programming (OOP) languages is much easier.
Object-oriented languages also support the reusability of program segments due to this
feature.
4. Efficiency: A program written in a suitable programming language enables a
computer system to translate it into machine code efficiently, execute it efficiently, and
manage it with less memory. A good programming language is supported by a good
language translator (a compiler or an interpreter) that considers space and time
efficiency.
5. Structured programming Support: A good programming language should have
the necessary features to allow programmers to write their programs based on
structured programming concepts. It significantly affects the ease with which a
programmer can write, test, and maintain their programs.
Moreover, it forces the programmer to look at a problem logically so that they create
fewer errors while writing a program for the problem.
6. Compactness: In a good programming language, programmers should be able to
express the intended operations concisely without losing readability. Programmers
generally dislike verbose language because they need to write too much. Many
programmers dislike COBOL because it is lengthy (lacks compactness).
7. Locality: A good programming language should be such that while writing a program,
a programmer need not jump around visually as they prepare the program’s text. It
allows the programmer to concentrate almost solely on the part of the program around
the statement they are currently working on.
COBOL and, to some extent, C and Pascal lack locality because data definitions are
separated from processing statements, perhaps by many pages of code, or have to
appear before any processing statement in the function/procedure.
8. Extensibility: A good programming language should allow extension through simple,
natural, and elegant mechanisms. Almost all languages provide subprogram definition
mechanisms for this purpose, but some are weak.
9. Suitability to its environment: In addition to being suitable for its application area, a
good programming language must also be ideal for its operating environment.
For example, a language for real-time applications must be interactive. On the other
hand, a language for data processing applications like payroll, stores accounting,
etc., may operate in batch mode.
Good programming:
A Good Program means that it should produce correct and faster results, taking into
account all the memory constraints. While making good programs, we need to follow
certain guidelines of programming language for creating a successful program. The
following is the list of good programming habits that one should keep in mind while
writing:
1) Clarity and Simplicity of Expression
2) Use of proper names for identifiers
3) Comments
4) Indentation