Since Alex asked… Here is a brief history of ML and particularly its life in Cambridge. Some names were changed to protect the guilty.
ML is a nasty little bugger of a language. It stands for meta language. Of course that sounds exceptionally arrogant particularly since it is not really a meta language and such things do exist (or at least ways of defining language grammars). Let me give you a short history of ML.
ML’s inventor, Donnie Meathooks was a brilliant yet smarmy professor of mathematics of computer science at the famous Recognizable University. He was writing something in a relatively inferior language one day, an attempt at a better closed n-dimensional hole counter. Of course as we all know, hole counters are not very efficient and this hole counter was equally inefficient, particularly because of a subtle bug somewhere in the program.
Dr. Meathooks was essentially coding an algorithm from paper, and the algorithm, he thought, was true. He also ran through his code and couldn’t find the bug easily by inspection. So, there were two possibilities: the bug was in the code or the bug was in the algorithm. Since Dr Meathooks was really a mathmo masquerading as a Compsci, the problem annoyed him greatly. He thought that if one wrote legitimate code that looked like… math, it should do what the math said it should do.
This of course, is not how most programs behave. Math is what computers are based on, but most programming languages implement algorithms quite differently than the math on which they are based. This causes no end of suffering for feeble mathmos who believe that math is a proper Deity and should be worshiped above all others.
So Dr Meathooks sat down and took a number of ideas that were bouncing around at the time, but his ultimate goal was this: make a programming language that is really good at math, particularly discrete math (the kind with integers like -2, -1, 0, 1, 2… of which computers are so fond). This means that one should be able to think in terms of the math involved and derive a program from rigorously proven mathematical statements, and conversely that given a program written in this language, one should be able to prove things mathematically about it.
The final statement is the real kicker, because to be able to make mathematical statements of proof about an algorithm, you have to essentially be able to verify that it does operations on sets, and that the sets have these behaviors, etc etc. It is a real constraint on the design of a program. It is, more than anything else, what makes ML behave the way it does.
Dr Meathooks knew that the best way to make things look like math would be to use a functional programming language. Functional languages are a bit complicated to explain, but suffice to say that one can write f(x)=blah in math, and one can also write f(x)=blah in functional programming. He also knew that to be able to constrain the language to sets, you have to make a “strongly typed language” which means that your string cannot suddenly become an integer, your integer cannot become a real number, etc. It also means that if your function takes or returns a real it will and must always take or return reals.
So at the end of the day, Dr Meathookshad crafted a language that was incredibly useful for things in math. He immediately implemented his hole counter and found that low and behold, it did not pass the type checker. He cried for days, and his bitter tears became the useless error messages that the type checker returns when your code does not pass.
Hewas so upset by the failure of his hole counter that he disowned his own child, but not before he had given it a cruelly ironic name, Metalanguage, or ML. ML left Recognizable University and wandered the land for many years growing a beard of sizable magnitude, from time to time finding work as a lowly academic language because of it’s useful self-consistency. In fact, ML had never even had a compiler written in its own language.
One day, a PhD student saw ML sitting in the fens lying on its back calculating approximations of square roots and was intrigued. He took the language back to the Computer Lab, gave it a scrub, cut its ratty beard, and started to implement some rather dull tree searching algorithms and was impressed. He then tried feeding in random algorithms from a textbook and was amazed at how quickly the algorithms were implemented, and how logical the translation was. He showed the language to his supervisor, who was of course, Larry Paulson. Larry took ML to his office and spent the next few weeks playing with it. After a few weeks, ML was being passed around the CL like a whore, and it seemed like nearly everyone wanted to play with him. This was in the days before good networking, so many floppies of ML were made.
It’s quite obvious why ML was so popular at Cambridge after it had suffered so at Recognizable University and everywhere in between: ML was completely unpractical. It did not sing, dance, and it couldn’t even paint(). But Cambridge was not like most places. Cambridge was ruled by the God of Maths. And Maths was a cruel god and did not want such silly things as graphics, sound, or regular expressions. Maths did not need to schedule lunches. And from the Temples of Maths, which governs all aspects of Cambridge Academia, the word was passed down: ML is good, and the Computer Lab should use it.
Now there were those among the Computer Labbers who dissented. The sane ones who used window managers not starting with fv, the ones who knew BCPL. Some of them even had mice in their offices (hidden in a desk of course). Thus a plot arose: ML would taught to undergraduates, and not only that but freshers. First. Before all other languages. This made the ML lovers happy and it made the God of Maths happy. That is, until the MLers realized that this meant that they, the keepers of ML would have to teach it to freshers. Then, they were angry. In their anger they devised the most useless and ridiculous of exercises to punish the helpless freshers.
These pointless exercises had a terrible side effect on the lecturers. The wiser students in lecture would actually say things like “pointer” and “heap” or even the dreaded “graphics.” Particular in the form of “Where is the…” however in even more vulgar forms like “Why isn’t there a…” and the almost unspeakable “This would be so much f’ing easier if it were “. Each time a student said this, the lecturer shuddered and glared at the students.
To Dr. Paulson, the biggest MLer there ever was, the pain was too much, and finally he locked himself away in a room, and wrote a textbook meant to tell students, particularly those who had actually seen a computer before and written in other languages, why the language was so good. And he had the book published under the title ML for the Working Programmer. And it was good. And the students that actually bothered to buy the book were satisfied. And then ML lead a someone tenuous but overall peaceful coexistence in Cambridge for the rest of its days.
The End