Хелпикс

Главная

Контакты

Случайная статья





Generation gap



 

Far from producing a universal programming language, the Internet is encouraging a proliferation of new ones. Whichever language, Java or C#, wins today's battle for the hearts and minds of programmers, the business of writing software is becoming steadily easier

WALK into any big bookshop, and chances are that you will find a whole floor devoted to weighty tomes with titles such as “UML in a Nutshell” or “Programming Python”. These books teach programming languages and related software tools. With their mind-numbing use of acronyms, they are not exactly a pleasure to read. But mastery of a programming language is a step along the road to success for many a whiz-kid with Internet ambitions.

Of all these languages, Java makes the most headlines. It has become synonymous with programming for the World Wide Web. Java has rocketed to fame since it was launched in 1995 by Sun Microsystems, the leading maker of computer workstations, in large part because of its promise of “write once, run everywhere”.

The development of Java is a case of corporate serendipity. Bill Joy, now a vice-president at Sun Microsystems, thought up the idea of a programming language that would be optimised for electronic gizmos, and thus easily transportable from one microprocessor to another. The project stuttered on at Sun until 1994, when Mr Joy and a team of researchers redirected the technology towards Internet applications. A year later, Netscape was incorporating Java in its browser.

But Java has become a household word for other reasons. The language has played a key role in the protracted legal battle between Microsoft and the American government's trust-busters. Sun Microsystems was a hostile witness in Microsoft's antitrust trial. So it came as no surprise when Microsoft launched a new programming language a year ago called C# (pronounced “C-sharp”).

Escalating the dispute, Microsoft is due to release its new operating system, Windows XP, on September 24th, with a four-year-old version of the code needed to run Java programs that makes that language seem decidedly clunky. Ever since it got wind of Microsoft's devious stunt, Sun has been racing to produce a piece of software that users can load into their computers so that Windows XP can take full advantage of Java's latest improvements.

News of these technological punch-ups is read assiduously by the financial crowd as well as the programmers. For, behind the headlines, a big linguistic upheaval is under way. On the surface, the changes may seem glacial. But deep within the arcane world of programming semantics, differences of opinion are hotting up. Their eruption will change the landscape of the Internet, and much else, for the better. The battle between Java and C# for the hearts and minds of programmers is just the beginning.

Generation gap

The plethora of modern programming languages has a common evolutionary background. With each new generation, programming languages have tended to become more abstract and remote from the computer that they communicate with. First-generation languages talked to the computer in the ones and zeros of “machine code”, which was interpreted directly by its central processor as instructions for manipulating data stored in its memory. The second-generation, or “assembly”, languages were devised to make the task of writing and reading such instructions easier, by using a code composed of letters and numbers, which was subsequently translated into the 1s and 0s that the machine could comprehend.

 
 

Third-generation languages, such as C, Pascal and Fortran, consist of English words such as READ, WRITE, andGOTO as well as mathematical symbols. Unlike first- and second-generation languages, the syntax (ie, the rules for combining symbols and words) of third-generation languages is in principle independent of the computer they run on. A separate program called a compiler is used to translate the code into machine language.

A further abstraction is achieved in fourth-generation languages such asSQL (Structured Query Language), a programming language for querying databases, or Mathematica and MathCad, languages for performing advanced mathematical manipulations and solving scientific problems. These languages also offer the programmer a far more natural form of expression, but at the expense of considerably narrowing the range of problems that the language can tackle.

When it came to developing a fifth generation of computer languages, this orderly evolution fizzled out. The Japanese government's Fifth-Generation Computer project—aimed at marrying artificial intelligence techniques with programming—was abandoned in 1992, with little to show for ten years of research and billions of yen. The Japanese policymakers did not foresee the rise of the Internet and the need for an entirely different approach.

What the Internet has done, in effect, is to place the priority on the programmer, rather than the language. The elegance of computer languages—so dear to academic software gurus—has been sacrificed for ease of use. That is what matters to people who are building web applications on a tight schedule. Hence the rise over the past decade of the quick-and-dirty scripting languages—the “sticky tape” of the World Wide Web.

  “A language that incorporates concepts from artificial intelligence will appear when the time is ripe—and leave Java and C#by the wayside. ”

These languages rose to prominence largely because they are so flexible and adaptable to the needs of the Internet. Examples include Perl, a language that can be used to communicate between a web server and its clients, and Python, a language used, among other things, for managing discussion forums on the Internet. Other examples with more awkward names include Tcl/Tk, awkandC Shell. There is even a scripting language called JavaScript—a clever marketing ploy, since it is linguistically unrelated to Java.

In many ways, scripting languages take the idea of fourth-generation languages a step further in the direction of simplicity. They are known as “interpreted” languages. That is to say, the computer interprets the programmer's wishes one instruction at a time, rather than having first to “compile” or translate the whole program before it can run. Writing interpreted programs is a bit like dashing off rhyming couplets. By comparison, writing compiled programs is more like composing a sonnet.

That makes scripting languages ideal for quick-fix solutions rather than mammoth projects. Also, scripting languages can put up with a considerable amount of ambiguity in the way they are written—that is, they are “weakly typed” in computer-speak. A “strongly typed” language such as Java will revolt at the slightest deviation from its standard way of doing things. Above all, scripting languages are designed to act as go-betweens for other programs, rather than as stand-alone units. This glue-like function is what makes them so attractive for web applications, in which communication between programs is vital.



  

© helpiks.su При использовании или копировании материалов прямая ссылка на сайт обязательна.