The Languages That Bend Your Mind

Many programming languages have been sold to unsuspecting software developers with enticing descriptions, promising “transformative experiences” that “irrevocably alter their way of thinking” and other ethereal descriptions, seemingly belonging to other categories of products, such as yoga classes, religions, drugs, progressive rock albums, or role playing games.

Most of the languages advertised as such belong to the “functional” category; a moniker usually justified by their lack of “side effects,” which for most purists is a bad, bad thing.

The first one in the list of mind-bending languages is of course Lisp, carried on by its quintessential idea; that the language looks exactly like its primary data structure, and thus, as such, naturally lends itself to metaprogramming. The name of this wonderful property is “Homoiconic.” It is also the first language implementing Alonzo Church’s lambda calculus. Not a small feat. Richard Stallman, Robert Morris, and Paul Graham are the great apostles of this religion, spreading the word of the church, because it’s not just lisp service. Sorry, I had to write that one.

APL is the next in the list. A language that consists of a mathematical notation able to parse and process vast amounts of data with the shortest of syntaxes, for which you need a special keyboard. A small but important community keeps this language alive, touting its capacities and eager to build the most complex programs with the least number of lines of code (usually just one,) maintainability be damned. It awkwardly reminds me of another language.

Then followed Smalltalk. The actual runtime where everything is an object, where everything is inspectable. Its most popular spin-off, called Ruby, took the crown thanks to Matz, _why, and DHH in the 2000s, spearheading the birth of a large number of Web 2.0 successes: Twitter, GitHub, GitLab, Airbnb, Dribbble, Shopify, and many more. Alas, with a somewhat lackluster performance and fail whales, a problem that Crystal and Elixir are still trying to solve.

Another recent mind bending language (although it took 20 years to reach that status) is Haskell. Miran Lipovańća’s book clearly played a role in this case. The timing of this book (2009) couldn’t have been better, given that many languages released during the 2010’s claimed Haskell as one of their major inspirations. Another illustrious member of the functional programming family.

We could also add F#, who as the bread-winning member of the ML family gets a lot of (deserved) press for its usefulness and expression power. Apart from Don Syme, the creator of F#, arguably Scott Wlaschin is the one stretching F# the most.

Using any of these languages, claim their pundits, is equivalent to a good dose of LSD, coupled with the vision of a thousand gods on top of a pyramid singing Dr. Alban’s hit “Sing Hallelujah!”

Some of these mind-bending languages have had notorious uses in finance, for example: most notably Smalltalk and F#. Lisp had its commercial hour of glory with Viaweb.

Of course, neither COBOL, nor Fortran, nor BASIC and its goto statement, nor C or C++ (although it sometimes does), nor Java or C#, nor Python, nor Go or Rust, belong to the “mind-twisting” category. They are impure languages, as impure and as imperfect as the world they try to represent.

Those are the languages everyone complains about, as Stroustrup once said. The useful languages, as categorized by Perlis. The boring ones, as I call them. But maybe, just maybe, that’s what explains their success in our industry and their simpler approachability; they embrace side effects and imperfection as natural features of our existence.

In any case, it’d be nice if at some point, as an industry, we could grow past this language fetish and move on.