Tuesday, January 8, 2013

Programming Languages

Machine Language refers to the "ones and zeroes" that digital processors use as instructions. Give it one pattern of bits (such as 11001001) and it will add two numbers, give it a different pattern (11001010) and it will instead subtract one from the other. In as little as a billionth of second. The instruction sets within a CPU family are usually compatible, but not between product lines. For example, Intel's x86/Pentium language and Motorola's PPC/Gx language are completely incompatible. Machine Language is painfully difficult to work with, and almost never worth the effort anymore. Instead programmers use the higher-level languages below, which are either compiled or interpretted into machine language by the computer itself.
Assembly Language is as close as you can come to writing in machine language, but has the advantage that it's also human-readable... using a small vocabulary of words with one syllable. Each written instruction (such as MOV A,B) typically corresponds to a single machine-language instruction (such as 11001001). An assembler makes the translation before the program is executed. Back when CPU speed was measured in kiloHertz and storage space was measured in kiloBytes, Assembly was the most cost-efficient way to implement a program. It's used less often now (with all those kilo's replaced by mega's or giga's, and even tera's on the horizon, it seems no one cares anymore about efficiency), but if you need speed and/or compactness above all else, Assembly is the solution.
C [successor to the language "B"] offers an elegant compromise between the efficiency of coding in assembly language and the convenience and portability of writing in a structured, high-level language. By keeping many of its commands and syntax analagous to those of common machine languages, and with several generations of optimising compilers behind it, C makes it easy to write fast code without necessarily sacrificing readability. But it still tempts you write code that only a machine can follow, which can be a problem when it comes time to debug it or make changes. Free and commercial tools (most of which now also support C++) are available from various sources for just about every operating system.
C++ ["C" with the C instruction to "increment"] is probably the most widely-supported language today, and most commercial software is written in C++. The name reflects why: when it was introduced it took all the benefits of the then-reigning development language (C) and incrementally added the next set of features programmers were looking for (object oriented programming). So programmers didn't have to throw anything out and re-do it... but they could add those techniques to their repertoire as needed. OO purists hate the results, but it's difficult to argue with that success. Free and commercial tools are available from various sources for just about every operating system. (Objective-C is an alternate approach to adding OO characteristics to C (borrowing directly from SmallTalk), which hasn't attracted as large a community of users.)
C# ["C++" with the plus signs overlapping, pronounced "C sharp", equivalent to D] is actually Microsoft's answer to Java. They originally tried to release "Java" development tools that would produce apps that weren't truly portable; you could only use them on Windows. But this violated their licensing agreement with Sun (creators of Java), who successfully put a stop to that. So Microsoft turned around and produced a language with similar features that effectively is tied to Windows. Although they are submitting the language to a standard-setting body, for all practical purposes it's just a proprietary variant of C++ whose specs they'll dictate, available only from Microsoft, and practical only for Windows.
Java [slang for "coffee"] is kind of a streamlined version of C++, designed for portability. Its key advantage is that Java programs can be run on any operating system for which a Java "virtual environment" is available. (Programs in most other languages have to be modified and recompiled to go from one OS to another.) The language is defined by Sun and widely licenced to other companies, making it possible to run Java apps in web browsers, portable phones, desktop computers, web servers, etc. It isn't as fast as applications written in a compiled language like C++, however. Free and commercial tools are available from various sources for most current operating systems. Although Microsoft is removing support for Java from the default setup of new versions of Windows, it can easily be added back in.
Pascal [mathematician/philosopher Blaise Pascal] was designed primarily as a tool for teaching good programming skills, but - thanks largely to the availability of Borland's inexpensive Pascal compiler for the early IBM PC - it has become popular outside of the classroom. Unlike many languages, Pascal requires a fairly structured approach, which prevents the kinds of indecipherable "spaghetti code" and easily-overlooked mistakes that plague programmers using languages such as Fortran or C. Free and commercial tools are available from various sources for DOSWindowsMacOS/2AmigaOS, and Unix-like systems. The web site editor BBEdit is written in Pascal.
Delphi [home of the Greek oracle Pythia] is a non-standard, object-oriented version of Pascal developed by Borland for their rapid application development tool of the same name. The Delphi environment was designed to compete with Microsoft's Visual Basic tools, freeing the programmer from having to write all the code for the user interface by letting her drag and drop objects and attach functions to various buttons and other on-screen elements. Its ability to manipulate databases is another strength. Commercial tools are available from Borland for Windows and Linux.
Oberon [a moon of Uranus] is a later sibling of Pascal and Modula (sharing a parent, creator Niklaus Wirth). The name also refers to the operating environment in which the language was designed to be used.
Turing [computer scientist Alan Turing]
BASIC ["Beginner's All-purpose Symbolic Instruction Code"] is the first language that most early microcomputer users learned. The BASIC interpreters on those machines weren't very sophisticated or fast, largely due to the memory and speed limitations of the hardware, and the language encouraged sloppy coding. As an unknown pundit put it: "BASIC is to computer languages what Roman numerals are to arithmetic" Modern versions of BASIC are more structured and often include compilers for greater speed. Free and commercial tools are available from various sources for DOSWindowsMac, and Unix-like systems.
Visual Basic [a version of "BASIC" for graphical environments] is Microsoft's Jack of all Trades language. It's a cross between BASIC, the various macro languages of Microsoft Office, and some rapid application development tools. The idea was to get people started writing macros using VBA (Visual Basic for Applications), then sell them the whole VB programming tool when they run into the limits of that approach. Unfortunately VB apps are impossible to port to other environments, and you're at the mercy of Microsoft's changing specs for the language. (Programs written in VB6 or earlier will not run properly in VB.NET!) Available only from Microsoft, only for Windows.
Euphoria ["a state of bliss"] is described by its creator as "simple, flexible, and easy-to-learn", and its supportive community of users agree. Although powerful, it's not prone to allowing "dangerous" mistakes. It's an interpreted language, but quicker than most, and it can be converted into C code, which can then be compiled using an optimising compiler. The interpreter and C converter (for both Windows/DOS and Linux/FreeBSD) are available free, or with some bonus features when registered for a modest fee.
Ada [proto-programmer Lady Ada Byron] Based largely on Pascal, it was commissioned by the U.S. Dept. of Defense to create a standard language to replace the polyglot they had amassed over the decades. It's commonly accused of being typical of government committee work, but has many strengths, including its error-handling and the ease of maintainingand modifying programs. Furthermore, government studies :) indicate that it's more cost-effective than C++, Pascal, or Fortran. The current version includes object-oriented features.
Icon [perhaps from "iconoclastic", pre-dating the current use of the term in graphical interfaces] is a high-level, imperative, procedural language. Text-handling is one of its strengths. Storage is allocated dynamically. Full versions exist for Unix-like systems, Windows, and Java envronments; older versions exist for pre-OS-X Macs and other operating systems.
Smalltalk ["easy conversation"] The object-oriented, graphical Smalltalk development environment is what inspired Steve Jobs and later Bill Gates to "invent" the Mac OS and Windows interfaces. Focusing on the superficial aspects of it (windows and mice) they missed the real gem: the language.
Squeak [the sound a mouse makes] is a variant of SmallTalk, created by alumni of the Xerox PARC (where SmallTalk and the computer mouse were invented) and of Apple, who are now working at Disney (home of a famous mouse). It's a deliberately open system, with even the Squeak interpreter itself written in Squeak. This makes it highly portable (it's available for Mac OS, Windows (95 and later), WinCE, Unix-like systems, BeOS, OS/2, and RISC OS), and makes it possible for a programmer to modify the language itself. The interpreter, optional compiler, and everything else are free.
Eiffel [engineer Gustave Eiffel] is an object-oriented language available for Windows, Unix-like systems, and VMS.
Ruby [the birthstone for July (following "perl" for June)] combines some of the best features of several other languages, leaving behind many of their shortcomings. It's a pure object-oriented language like Smalltalk, but with clearer syntax (inspired by Eiffel). It has powerful text-handling like Perl, but is better structured and more consistent. It borrows ideas (but not the parentheses) from Lisp. Those who've tried it seem to love it, and rarely switch back to their previous languages. A free interpreter is available for Windows, Unix-like, Mac, OS/2, and BeOS systems.
Python [comedy troupe Monty Python] is an open-source, interpreted object-oriented language developed for Unix and now available for everything from DOS to Mac OS to OS/2 to Windows to Unix-like systems. It shares many positive attributes with Ruby, and adds the ability to run it on any machine that supports Java. It's often criticised, however, for not being as purely object-oriented as other languages.
M / MUMPS ["Massachusetts (General Hospital) Utility Multi-Programming System"] is a procedural, interpreted language, originally used for medical records (hence the cutsy acronym that many of its users are trying to get away from) and widely used where multiple users access the same databases simultaneously. It's inherently portable, as it stores all data in text format; text handling is one of its strengths. Its much-loved concision (commands can be a single letter) can make the code difficult for humans to read, however. Available in free and commercial versions for Windows, Unix-like systems, VMS, Mac OS, and others.
Macromedia Director and Flash are the de facto tools of choice for developing web sites featuring dynamic media. They're not really "languages", though both include a bit of their own scripting. Instead they're GUI development environments for producing "source code" modules containing both data and instructions, which can in turn be "compiled" into executable programs. As tools for creating snazzy graphical user interfaces, they are top-notch, but they require some separate back-end programming for anything that will require processing or manipulating data.
Similarly, Apple's HyperCard is a primarily visual tool, so different from regular development methods that "real" programmers have never taken it seriously, and even Apple has never figured out how how to market it (currently associating it with their QuickTime video technology). It's remarkably powerful, especially when used with the many extensions available for it. For example, it was good enough for the creators of Myst, one of the best-selling (and arguably best) computer games ever.
Rexx ["REstructured eXtended eXecutor language"] aims to control everything... or at least it offers to.
Perl ["Practical Extraction and Report Language"] is often treated as synonymous with "CGI scripting". In fact, Perl is even older than the Web itself; it got its nose into the Web-scripting tent and thrived due to its strong text-processing abilities, incredible flexibility (its creator likens it to duct tape), portability (it's available for nearly every modern operating system), andprice (free). The Internet Movie Database and Yahoo both run on it.
TCL ["Tool Command Language", pronounced "tickle"] can interact well with text-based tools like the powerful editors, compilers, etc. found on Unix-like systems, and its TK extension gives it access to graphical interfaces like Windows, Mac OS, and X-windows, acting as "glue" to tie together standard components to accomplish complex tasks. This modular approach is the conceptual foundation on which Unix itself was based.
Pike [after... a fish] is yet another open-source, free language, invented through personal necessity, and now developed by Roxen Internet Software of Sweden. It's has strong data handling and object-oriented tools. Its syntax is similar to C, and can be extended to take advantage of compiled C libraries and modules to improve performance, available for most Unix-like systems.
Dylan ["DYnamic LANguage"] is "an advanced, object-oriented, dynamic language which supports the rapid development of programs."
Lisp ["LISt Processing"] is "a programmable programming language", built on the concept of recursion and highly adaptable to vague specifications. Avoid it if you find parentheses unappealing (its syntax tends toward a proliferation of nested parentheses), but its ability to handle problems that other languages cannot is one of the reasons this 40+-year-old language is still in use. There's an entire cross-platform web server written in it.
Scheme ["an organised plan"]
Logo is an educational language. It isn't just used to teach programming, but to teach. Full stop. The learning curve is shallow enough for even small children to get started quickly (giving instructions to the "turtle"), but it's powerful enough for an experienced user to do a great deal with it. It's derived from Lisp, but with a much simpler syntax. It is interactive andinterpreted, which is part of what makes it such a good learning tool: immediate feedback allowing immediate adaptation. Various implementations are available for most modern (and not-so-modern) computers.
ToonTalk is a highly-visual environment designed to teach children the principles of programming. Rather than typing instructions, the programmer manipulates various objects (LEGO-looking toy items that come to life when used) to define how the system is supposed to work. Unlike "educational" puzzle-solving computer games, ToonTalk encourages its users to create their own puzzles. Experienced C++ programmers will hate it, but then, most 4th-graders wouldn't care for C++. :-) It's available for Windows only.
Other languages claim to be visual, but Prograph ["PROGRAmming GRAPHically"] is a truly visual programming language, in which the diagrams and flowcharts that describe what the program does are the program.
Prolog ["PROgramming in LOGic"] As an independent study project in college, I wrote a Prolog application which evaluated and proved (if possible) arguments in propositional logic (e.g. "A implies B, and A is true, therefor B is true") a task which would have been much more difficult using a procedural language.
Mercury [messenger god of the Greek pantheon]
Haskell [mathematician/logician Haskell Brooks Curry] is a functional language, meaning that it is used to describe what should be computed, not how to compute it. (Spreadsheets use a similar approach.)
O'Caml ["Objective Categorical Abstract Machine Language"]
COBOL ["COmmon Business-Oriented Language"] is the language modern programmers love to hate and ridicule. Although it is nearly as old as commercial computing itself, improperly blamed for Y2K issues, and its imminent extinction is frequently predicted, it is still in widespread use due to its usefulness for traditional business uses of processing data and producing reports. A version with object-oriented tools has even been created, with an inexpensive integrated development environment for Linux and Windows available. It is very verbose, designed so that its commands would describe in English exactly what it was doing. e.g. ADD SHIPPING-CHARGE TO INVOICE-SUBTOTAL
Fortran ["FORmula TRANslation"] is the oldest language still in general use, dating back to 1957, the year the Space Age began. It excels at the first task computers were called on for: number-crunching. This is the language that literally put a man on the moon, and some of the features it developed in the process of that project (and other less glamorous ones) have yet to be duplicated in other, more "modern" languages.
Erlang [mathematician Agner Erlang; also "ERicsson LANGuage"] was originally developed for use by telecom firm Ericsson, but has been released to the public as open sourcesoftware. It's a low-level language in the sense that it allows the programmer to control things that are often left to the operating system, like memory management, concurrent processing, loading changes to the program while it's running, etc... all of which can be useful in programming small devices (like the ones Ericsson makes). compiled
REBOL ["Relative Expression-Based Object Language"]
Clarion
dBASE ["DataBASE"] (renamed "Xbase" to avoid trademark issues) was the command language for Ashton-Tate's ground-breaking database management program (the first such tool for microcomputers). As the program grew, so did the language, until it became an application development tool in its own right. At its zenith, various competing implementations and compilers were available and the language became standardised. Xbase didn't make the transition to Windows very well, but it's still being used and supported (kind of the COBOL of the microcomputer age).

0 comments:

Post a Comment

Powered by Blogger.