Why programming languages?

59
rate or flag this page

By AlexK2009


The earliest  electronic digital computers were programmed with a soldering iron. This got tedious so engineers devised ways to simplify this. The dream of being able to talk to computers as to humans, while currently impossible, largely because of the ambiguous and shifting nature of language, led to the sophisticated programming languages of today

You are probaby reading  this on a Personal Computer, a general purpose information processor that can be programmed to do anything that is not theoretically impossible. The other computers in your vicinity, the ones in your watch and toaster for instance, are less flexible, often dedicated to a single task or small set of tasks.

A computer is a black box that does what you tell it. Unfortunately  it does not always understand you correctly, what you tell it is not always what you thought you told it, and there are side effects, usually unwanted.  Programming languages are (relatively) well specified formal languages designed to eliminate the first two of these problems.


The high level view of the history of programming languages

A computer processes information. It dies this by shunting around  pulses  of electricity and transforming  sequences of pulses. A sequence of pulses and the space between them can be treated as a binary number (it would take too long to explain  the binary system here) so one can think of a computer as working with  and on numbers.  We can encode the alphabet into distinct numbers so we can think of the computer as working with words –  sequences of characters.

The first step in simplification was the assembler language, a program that could take a program typed by a human and translate it into low level instructions the machine could execute directly. An assembler gives complete control over a particular machine but absolutely no safeguards against human error. 

as an example  take the computer statement

A + B = C

Which means replace the contents of location A with the sum of the contents of location B and location C. In  one assembler it might  be replaced by

Load B,1     (load the contents of B into register 1)
Load C,2

Add B,C,3   (add B and C storing  the result in register 3)

Store A,3    (store the contents of register 3 in A)

Very few people program in assembler today. As you can see it is verbose and susceptible to typing errors.

The next step up from Assemblers was the high level language, a language  designed to be more like human language. The people writing these languages soon learned it was a good idea to put in safeguards against the most common types of human error. One of the earliest, and probably the most famous language is FORTRAN, short for Formula Translation. It was  designed  for solving mathematical problems. It came out  around 1963 and is still in use today but looks very different from the original version.

The first “high level” languages like Fortran unleashed a frenzy of research and experimentation. Now there are hundreds if not thousands of programming languages  around though I  would think not more than a dozen are in mainstream use. There is no one programming language suitable for all problems  and there is now a trend to develop specialist languages for very well defined but limited ranges of problems


Summary

Computer programming languages have evolved in order to simplify the task of controlling a computer.  The aim of instructing a computer  in natural language has not been realised but the languages in use today allow software developers to handle problems that would have been impossible a few years ago. While  programming languages can protect against ambiguity and misinterpretation of what the machine will do they cannot protect against unwanted side effects.

In a future article in this series I hope to look at what a programming language must be able to do and the various types of language that exist today. I will also give high level overviews of a few languages

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

GreenMathDr profile image

GreenMathDr  says:
2 months ago

Great hub. I had to learn FORTRAN in college and we had to feed the computer a large stack of punch cards and to be honest I hated it.

AlexK2009 profile image

AlexK2009  says:
2 months ago

Thanks. I remember punched cards too. And the guy who dropped his program ( much of it assembler that did not show up on the top of the card) on a windy day.

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working