Many different computer languages exist, for many different reasons. No matter what language you despise, someone else thinks its the greatest thing since sliced bread; you would do well to remember this when you talk about other computer languages.
These, too, are my own personal biases, and are informally based. Some opinions are based on having used a language with some frequency; others are based on "book-learning" and "exposure" to the language rather than any in-depth usage and study. This is not a comprehensive listing of languages by any means, but most popular languages should be listed. These languages are basically my favorites (and occasionally, flops that I've endured).
There are many problems with the languages that exist today. For some reason, no one has seemed to notice. These are the main ones:
Unnecessarily Strange and Complex Syntax
This does not apply to languages that do not adhere to any traditional (ie, ALGOL) syntax but create their own (such as FORTH, Smalltalk, LISP, or APL). These languages require a programmer to think differently and were original creations, not spin-offs - a non-ALGOL syntax forces the programmer to think differently and to learn a new way to program.
Compiling to Another High-Level Language
Lack of Scoping
To explain better, let's compare a code fragment from C, FORTH, and COBOL:
C | FORTH | COBOL |
---|---|---|
if (valve == OPEN) { if (temp > MAXTEMP) { printf("HOT!\n"); } else { printf("Valve closed.\n"); } } |
VALVE ?OPEN IF TEMP @ MAXTEMP > IF ." HOT!" ENDIF ELSE ." Valve closed." ENDIF |
IF VALVE EQUALS OPEN IF TEMP GREATER THAN MAXTEMP DISPLAY "HOT!" ELSE NEXT SENTENCE ELSE DISPLAY "Valve closed.". |
The COBOL statement NEXT SENTENCE
is required in this situation
(and others like it). Otherwise, the last ELSE
would match
up with the wrong IF
statement, causing all sorts of havok.
In C, the innermost if
statement is terminated by a curly
bracket; in FORTH, the same inner IF
is terminated by an
ENDIF
. Newer versions of COBOL (like the last 20 years!)
don't have this problem.
Interpreters
This rant against interpreters does not apply to "low-level" interpreters, such as the Smalltalk byte-code interpreter, the FORTH inner interpreter, or the UCSD Pascal p-Code interpreter. These interpreters implement a "virtual machine" for their respective languages; such interpreters can be a plus (if designed and implemented properly). I would suggest that the FORTH inner interpreter is very clean and slick, the Smalltalk byte-code interpreter is probably well done, and the UCSD p-Code interpreter was a part of what lead to the (unfortunate) demise of UCSD Pascal.
OS Interaction - and File Input/Output in Particular
In fact, the "skeleton" that many language programmers use probably contains mostly file I/O set up; in COBOL, it seems that that is most of what is contained in many programmer's program skeletons. I know every time I wrote a COBOL program, file I/O was the biggest obstacle and was resolved by a good program skeleton from a previous program.
To me, this is the biggest hurdle in learning any language. There is no shortage of so-called "tutorials" that teach you how to do everything except important operations like:
Creating a turnkey application is absent from even more tutorials and introductions than is file input/output. What good is a tutorial or introduction unless you can create a program fergoshsakes! Sometimes, I suspect that these "introductions" are merely for people who want to study a language (like one studies a frog) and not for real programmers.
To me, the four items list above are critical to know; a tutorial which does not include them is at best incomplete.
Smalltalk
C
FORTH
Pascal
C++
Sather
Logo
BASIC
Perl
LISP and Scheme
COBOL
SUBTRACT A FROM B GIVING C.
(complete with period,
no less!). This wordiness also works against COBOL, making even the
smallest COBOL program balloon in size; a printout of a large project
could weigh more than a small child! COBOL also has had problems
in scoping, and in file input/output. Its method of defining data
areas is a weakness, with arrays being a particularly notable
missing or poorly implemented feature.
Some of the language's problems are being solved through the current attempt at ANSI standardization and new language features; COBOL is by no means dead, but is widely used and continues to evolve with new and modern features. The biggest revolution in COBOL seems to be ANSI Standard Object COBOL, introducing object-oriented programming to COBOL.