Why INTERCAL is better than Perl

Copyright © 2002 - Jean Forget

[+ del.icio.us] [+ Developers Zone] [+ Bookmarks.fr] [Digg this] [+ My Yahoo!]


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:


and the like. This technique works in most languages, but it is useless in INTERCAL. All variables are numbered, there is no way to confuse .123 with .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.

Perl's sigils are insufficient

In Perl, variables are prefixed with a sigil: $ for scalar variables and @ for arrays. There are some other sigils, such as the mostly unused & for subroutines and % and * for 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 with , (tail) or 32-bit values holding arrays when prefixed with ; (hybrid).

No nail clippings in INTERCAL

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.

Simplified precedence rules

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

  (The remainder of this page is intentionally left blank)


  1. Keep  in  mind  that the aim in designing INTERCAL was to
     have no precedents.

Perl's extensions are INTERCAL's built-ins

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 Roman.pm or Lingua-Perligata from 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.

INTERCAL, a user-oriented language

What are the I/O instructions in Perl and INTERCAL?

Input is 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 print or write in Perl, while it is DO 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.

GOTO Considered Harmful

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 incomparably better 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 comp.lang.perl.* newsgroups!

Programming is fun

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.

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.

Ego Boosting

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 FORGET.


Jean Forget <J-FORGET@wanadoo.fr>, les Mongueurs de Perl http://www.mongueurs.net/

[IE7, par Dean Edwards] [Validation du HTML] [Validation du CSS]