Page 72 - DLIS108_INFORMATION_AND_COMMUNICATION_TECHNOLOGY_APPLICATIONS
P. 72
VED1
e\L-lovely-eng\comm8-1.pmd IInd 16-9-11 IIIrd 22-12-11 IVth 4-1-12
Unit 8: Programming Language: Types and Functions
Some authors restrict the term “programming language” to those languages that can express all
possible algorithms; sometimes the term “computer language” is used for more limited artificial Notes
languages. Thousands of different programming languages have been created and new ones are
creating every year. Few languages ever become sufficiently popular that they are used by more
than a few people, but professional programmers may use dozens of different languages during
then careers. Let us come to known about some facts of programming languages.
Function: A programming language is a language used to write computer programs, which instruct
a computer to perform some kind of computation and/or organize the flow of control between
mechanical devices.
Target: Programming languages differ from natural languages in that natural languages are only
used for interaction between people, while programming languages also allow humans to
communicate instructions to machines. In some cases, programming languages are used by one
program or machine to program another; Postscript source code, for example, is frequently generated
programmatically to control a computer, printer or display.
Constructs: Programming languages may contain constructs for defining and manipulating data
structures or for controlling the flow of execution.
Expressive power: The theory of computation classifies languages by the computations they can
express. All Turing complete languages can implement the same algorithms. ANSI/ISO SQI and
Charity are examples of languages that are not Turing complete yet often called programming
languages.
Non-computational languages, such as markup languages like HTML or formal grammars like BNF,
are usually not considered programming languages; however, informal usage sometimes includes
them.
A prominent purpose of programming languages is to provide instructions to a computer. As such,
programming languages differ from most other forms of human expression in that they require a
greater degree of precision and completeness. When using a natural language to communicate with
other people, human authors and speakers can be ambiguous and make small errors, and still expect
their intent to be understood. However, computers do exactly what they are told to do, and cannot
understand the code the programmer “intended” to write. The combination of the language
definition, the program, and the program’s inputs must fully specify the external behavior that
occurs when the program is executed.
Many languages have been designed from scratch, altered to meet new needs, combined with other
languages, and eventually fallen into disuse. Although there have been attempts to design one
“universal” computer language that serves all purposes (e.g., PL/I), all of them have faild to be
accepted in this role. The need for diverse computer languages arises from the diversity of contexts
in which languages are used: Programs range from tiny scripts written by individual hobbyists to
huge systems written by hundreds of programmers. Programmers range in expertise from novices
who need simplicity above all else, to experts who may be comfortable with considerable complexity.
Programs must balance speed, size, and simplicity on systems ranging from microcontrollers to
nearly constant modification. Finally, programmers may simply differ in their tastes: they may be
accustomed to discussing problems and expressing them in a particular language. One common
trend in the development of programming languages has been to add more ability to solve problems
using a higher level of abstraction. The earliest programming languages were tied very closely to
the underlying hardare of the computer. As new programming languages have developed, features
have been added that let programmers express ideas that are more removed from simple translation
into underlying hardware instructions. Because programmers are less tied to the needs of the
computer, their programs can do more computing with less effort from the programmer. This lets
them write more programs in the same amount of time. Natural language processors have been
proposed as a way to eliminate the need for a specialized language for programming. However,
this goal remains distant and its benefits are open to debate,
LOVELY PROFESSIONAL UNIVERSITY 67