The ALGOL Roots of Dylan

Dylan is often seen as a descendent of the Lisp family of languages. It was designed (and implemented) by people from the Common Lisp world and borrowed lots from Scheme, EuLisp and other Lisp dialects. On the other hand, it was given a syntax from the ALGOL tradition rather than using s-expressions.

It is interesting to compare some of what is present within the Dylan language design with ALGOL though and see if perhaps some of the ALGOL influence wasn't just in the syntax. It is difficult today to know the extent to which ALGOL 68 was a direct influence versus having been filtered through Common Lisp and other languages. After all, Dylan was designed some 25 years or so after ALGOL 68. (At the time of this writing, Dylan itself is over 20 years old.)

It is clear though that many languages have picked up ideas from ALGOL over the years, including languages that were direct influencers of Dylan such as Scheme.

This post isn't intended to say "this concept came from ALGOL" but just to look at some of the interesting similarities.

Orthogonal Design

ALGOL 68 as defined in the Revised Report on the Algorithmic Language ALGOL 68 and one of the design goals noted there is that it should have an orthogonal design:

The number of independent primitive concepts has been minimized in order that the language be easy to describe, to learn, and to implement. On the other hand, these concepts have been applied "orthogonally" in order to maximize the expressive power of the language while trying to avoid deleterious superfluities.

This is something that was (largely) followed when designing Dylan as well. (It is arguably complicated somewhat by the addition of macros.)

While this wasn't a design goal for, say, Common Lisp which had other design goals, Scheme was designed to be a much more minimal Lisp. Looking around today, this clearly isn't a design goal for many of the popular languages of today like C++, Java, Scala or Ruby.

Lexical Scope and Block Structure

Interestingly, lexical scope originated in ALGOL and was picked up by many languages after that. While Scheme uses lexical scope, Common Lisp permits dynamic scope as well. Dylan uses lexical scope.

Similarly, the block structure of Scheme (and Dylan) originated with ALGOL.

Union Types

ALGOL 68 introduced the concept of "united modes", or what we now know as "union types" in many modern languages.

In ALGOL 68, this would look like:


In Dylan, this would look like:

let <node> = type-union(<real>, <integer>, <string>);

In Dylan, types are values, so we just use a regular old variable to store the new type.

Common Lisp supports union types via or and compilers can use union types internally, as described in the CMUCL User's Manual.

Expression Oriented

ALGOL 68 was an expression-oriented language. This meant that all constructs in the language could be used as expressions. (This is typical in a Lisp as well as many other languages today.)

In ALGOL 68, this was valid code:

INT output := IF input = 2 THEN 42 ELSE 4711 FI;

In Closing

Hopefully, this gives you a taste for some of the many influences that ALGOL and ALGOL 68_ had on subsequent programming languages and, in particular, on Dylan.

ALGOL and ALGOL 68 were very interesting languages in their own rights and drove a lot of innovation in their own times. Some of these ideas survived through to the current day (call by value vs call by name parameters for example), while others have fallen by the wayside (like allowing spaces in variable names or Van Wijngaarden grammars).

Further Reading