Copyright © 2002 - Jean Forget
The first programming languages, FORTRAN and COBOL, were created in the '50s. They were big heaps of c..p (hey, you can't always get things right on first try). So, inevitably, they were followed by other programming languages.
There was a big problem, though. FORTRAN was a failure, yet most
programming languages are FORTRAN's sons and grandsons: Algol, C,
awk... and Perl. So, most programming languages have inherited
FORTRAN's defective characteristics.
On the other hand, a few programming languages were designed to get rid of FORTRAN's heritage and to seek their own untread way. INTERCAL was the first of these pionneers. So, let's compare a conventional language, Perl, with an innovative one, INTERCAL.
There is always some risk in Perl that an evil programmer will write an unreadable program. There are elaborate obfuscation techniques, but a simple one is using confusing variable names, such as:
$OO00 $O0O0 $O00O $Illl $IllI $llII
and the like. This technique works in most languages, but it is
useless in INTERCAL. All variables are numbered, there is no way to
.321. As for the readability issue in
general, INTERCAL programs cannot degrade. Even the best-written
INTERCAL program is unreadable, it cannot get significantly worse.
In Perl, variables are prefixed with a sigil:
$ for scalar
@ for arrays. There are some other sigils, such as
the mostly unused
& for subroutines and
incomprehensible unspeakable useless features. The problem is, you do
not know what is stored within a scalar variable or an array variable.
In INTERCAL, you know. The
. (spot) and
: (two-spot) both
identifies scalar variables, but you know that
. is used to
store 16-bit values and
: is used to store 32-bit values. Likewise,
array variables are either 16-bit values holding arrays when prefixed
, (tail) or 32-bit values holding arrays when prefixed with
A famous thinker has compared parentheses with disgusting nail
clippings. Most languages, including Perl, use these to delimit
sub-expressions when these sub-expressions do not verify the
language's precedence rules. INTERCAL gets rid of these disgusting
nail clipping by using paired rabbit-ears (
") and paired sparks
') to group sub-expressions.
One of the best-known critics against Perl is that the precedences are incredibly complicated. INTERCAL has taken the opposite way, by simplifying as most as possible the precedence rules. Actually, here is a quote from INTERCAL's manual:
3.4.3 Precedence Precedence of operators is as follows 1 (The remainder of this page is intentionally left blank) ____________________ 1. Keep in mind that the aim in designing INTERCAL was to have no precedents.
If you want, say, Roman numerals, you have much tedious work to do
with Perl: ask to a newsgroup or your local Perl Mongers group or to
your colleagues, download
CPAN, unarchive it and install it. Not so with INTERCAL. Roman
numerals are an inherent part of the run-time library. Just print a
number and you will get it in Roman numerals.
What are the I/O instructions in Perl and INTERCAL?
readline in Perl, while it is
DO WRITE IN in
INTERCAL. That means, when the user has to write some data to feed the
program, Perl uses the program-centered verb read and INTERCAL uses
the user-oriented verb write.
Likewise, output is
write in Perl, while it is
READ OUT in INTERCAL. That means that when the program gives the user
something to read, Perl uses the program-based verb write while
INTERCAL prefers the user-centered verb read.
The conclusion is evident: Perl programs are selfish entities that could not care less about users, while INTERCAL programs respect them.
A well-known fact in programming is that GOTO is considered harmful.
Therefore, a programmer should never, under any circumstances, use
this 4-letter word. Yet, it exists in Perl. On the other side,
INTERCAL has resolutely discarded this despicable thing. If you need
to alter the flow of your program in any way, you just use the
COME FROM statement.
Internet has become a part of our lives and we can only regret that as
a means of sharing information it has somewhat failed. Take for
example the newsgroups: A long time ago, you could ask a question and
get back a few accurate answers within a few hours. This is still the
case with the
comp.lang.intercal newsgroup dedicated to INTERCAL.
But now, the signal-to-noise ratio of the Internet is considerably
lower. You have 30 or so mailing-lists and 5 newsgroups in the Perl
category, and the signal-to-noise ratio is zero or nearly so!
According to http://groups.google.com/, INTERCAL appears only 72
times in all 5
One of the most important aims of Perl is to have fun while writing programs. Admittedly Perl has been successful in this matter, yet INTERCAL is better. For the same task, you will write a Perl program in, say 15 minutes, while you will need a couple of days if you are using INTERCAL. What do you prefer, a 15-minute bliss or a 2-day long nirvana?
Lastly, or nearly so, there is magic. Admit it, magic in Perl is a hollow boast. They tell you there is magic here and there, but you never have to say a magic word. In INTERCAL, you have to say the magic word.
Remember when you were young:
-- Mummy, I want chocolate! -- I didn't hear the magic word. -- Chocolate, I want chocolate!! -- Say the magic word and you'll get chocolate. -- I WANT CHOCOLATE NOW!!! >Smack!< -- WWWWAAAAAAA!!!!
And then, your sister would come in and say:
-- Mummy, I want chocolate puhlease... -- Here there is. Good girl. And... -- Thank you.
Now, your INTERCAL program will not work if you do not say the magical word please. You must use PLEASE from time to time when writing your statements. Actually, INTERCAL rejects both rudeness and obsequiosity. You must use PLEASE between 20% and 33% of the time.
It is always nice to see your name from place to place in your program
listing. There was already the
gcc implementation of the C
language, which supports a
-Wall option. With INTERCAL, you can
regularly type your name in your program. Especially if your name is
Jean Forget <J-FORGET@wanadoo.fr>, les Mongueurs de Perl http://www.mongueurs.net/
Copyright © Les Mongueurs de Perl, 2001-2011
pour le site.
Les auteurs conservent le copyright de leurs articles.