Programming languages
By Matt Nicholson
Matt Nicholson introduces a ten-page survey of the main programming languages, tools and supporting frameworks in use today.
HardCopy Issue: 39 | Found In: Development | Published: 01/02/2008 | Last Revision: 06/07/2010
Back in the mid-1970s I was taking a degree course in computing. One of my projects involved writing what would now be called a device driver that would allow a transistor-based computer to communicate with a tape drive. The computer was a museum-piece even then, although fully working. It occupied a reasonable-sized room and was programmed by setting a bank of switches and then pressing a button to load the corresponding binary number into the accumulator. Alternatively there was a paper-tape reader that could perform the task automatically from a tape that you had punched earlier using a teleprinter.
The functionality of that computer now corresponds to just a portion of a modern microprocessor which is so fast that the time it takes the light to get from one side of the chip to the other is a limiting factor. Nevertheless, even this has the equivalent of an accumulator (several in fact) which is still loaded with binary numbers that can represent both data values and instructions. The binary instructions are called machine code and the language that I was typing into the teleprinter was assembly language.
Possibly the first person to actually write a computer program, Ada Lovelace pre-dates the first working computer by over a century. She was also the only legitimate daughter of Lord Byron.
In 1833, at the age of 17, Ada met Charles Babbage at a party and became interested in his ideas for an Analytical Engine. Although he never actually constructed the device, it is clear from his plans that the Engine embodied most of the features required by a modern computer.
Their friendship blossomed and some ten years later Ada, who was an accomplished mathematician, assisted Babbage by translating a description of the Analytical Engine, written in Italian by the mathematician Luigi Menabrae, into English. With Babbage’s support and assistance she added a set of notes in which she described what we would now call a program that could be used by the Engine to calculate Bernoulli numbers.
You can find the text of her notes at www.fourmilab.ch/babbage/sketch.html. In 1979 the United States Department of Defense named the computer language Ada after her. A# is a port of Ada for the .NET platform.
These languages are still in use today, and indeed many of the instructions that I was typing into that early computer would be understood by the modern processor. The difference is that no-one who doesn’t actually work for a microprocessor manufacturer would dream of using assembly language today. Instead we use one of the many high-level languages that have evolved through the past 30 years.
It’s been a long strange trip. First came Fortran, Cobol and then Algol, followed by Basic in the mid-1960s. These introduced the basic data types together with subroutines and statements such as If..Then, Case, Do..While and the infamous Goto, responsible for so much ‘spaghetti code’. Then came C, a compact and elegant language whose early success was intimately tied to Unix. The highly structured Pascal language was also becoming popular, competing with Basic for the nascent micro-computer market of the mid-1970s.
An early Grey Matter advertisement, appearing in Personal Computer World magazine in 1986, is dominated by listings of compilers, interpreters and libraries for Basic, C and Pascal. There is a panel devoted to assemblers and another to program editors. Other tools mentioned cover Algol and Fortran, together with Ada, Prolog, Lisp, Modula-2, Smalltalk and even Snobol.
Object orientation was the next major advance. First catching the public’s eye through Smalltalk, developed by Alan Kay at Xerox PARC, object orientation was an idea before its time as computer hardware was not yet powerful enough to make it practical. It finally entered the mainstream with C++ in the early 1980s, while Microsoft’s Visual Basic and Borland’s Delphi became very successful a decade later through their combination of object-based concepts with a visual tool for implementing user interfaces for Windows.
Then came Java. Developed by James Gosling at Sun Microsystems and first made public in 1995, what made Java special was the virtual machine which allowed Java programs to run on many different platforms. Microsoft’s response was the .NET Framework which first appeared in 2000. Like Java this made use of a pre-installed runtime, however the .NET runtime was designed to support a variety of languages, the most popular of which are Microsoft’s own VB.NET and C#.
The current chapter in this story revolves around the World Wide Web with scripting languages such as JavaScript and Ruby, new platforms such as Adobe’s Flex and tag-based environments like PHP. Over the next pages we take a closer look at the main languages in use today, together with their principle development environments and supporting frameworks and libraries.
Shooting yourself in the foot
Over a few articles within this edition of HardCopy (39) you will find descriptions of how to shoot yourself in the foot in a variety of different computer languages. These have been circulating around the Web for decades in one form or another, so we cannot claim any originality here. We’ll start with Ada:
-- The Department of Defense kidnaps you, stands you in front of a firing squad and tells the soldiers, “Shoot at his feet.”