Comical Coder Considers Worst Programming Language Ever – The New Stack
Developer Mark Rendle argues that those who fail to learn from history “are unable to iterate on it and make it worse”.
In a remarkable talk at last year’s NDC conference in Norway, which has since gone viral in the developer community, this comical coder introduced himself as a .NET developer who’s been in software for 30 years. . “And all the while,” he said, “I’ve been working with some really horrible programming languages.”
But then he promised to share with his audience the worst features of programming languages ”that might in other ways be very, very good and perfectly acceptable.
“And we’re going to mix them all together and create the worst programming language that has ever existed in all of history.”
Early on, Rendle turned to Python, which he calls “generally very good and very reasonable.” But then it displayed two identical-looking blocks of code, one of which throws an error because its space consists of a to mix together tabs and spaces. (A boredom it shares with F#, Haskell, and Occam.)
So Rendle’s language went even further: “We’re going to use two spaces for indentation, but if you indent four spaces, you’re using a tab.
“If you indent six spaces, then you use a tab and two spaces… And so on and so on and so on…”
Rendle’s language also offers its own variation on line numbers: they are only used sporadically, to mark the intended destinations of GOTO statements.
But, in addition, “because I’m a big fan of Douglas Adamsline numbers must be a multiple of 42.” (A prominent number in Adams’ “The Hitchhiker’s Guide to the Galaxy”.)
And the increments must occur in an unbroken sequence – so if you later insert a numbered row into your program, the value of each subsequent numbered row must be increased by 42 (with corresponding changes also made in every GOTO statement referencing those line numbers).
“We’ll sell a refactoring tool that will do that for you,” Rendle told his audience. “For $20,000.”
Beyond the pit of success
Language designers often talk about platforms designed to encourage successful coding practices, so even beginners still fall into “the chasm of success.But Rendle counters that this paradigm “doesn’t seem fun at all”, instead proposing an alternative design paradigm called “the Aztec temple of failure trapped”.
“You should feel like Harrison Ford running off a giant boulder and then running into a group of people pointing arrows at you with a Nazi archaeologist.”
Thus, doing simple things should be made “as difficult as possible” – while more complicated tasks should be left entirely to the programmer. From PHP, Rendle not only adopts its inconsistent letter cases, but also its “unnecessary variable prefix”. So, instead of requiring dollar signs in front of variables, Rendle’s language will require each variable to be preceded by the euro symbol. “This has the added benefit that it’s actually quite hard to type on most keyboards…”
“And for string concatenation, we’ll use commas rather than the plus symbol.”
Rendle’s language also includes a command that throws a single catch-all exception without further details. “We’ll leave it up to the programmer to analyze the stack trace and memory dump to determine what really happened.
This exception will be called
HALT_AND_CATCH_FIRE…It’s basically like ‘
panic!‘ – but much more dramatic.
For greater effect, Rendle adopts Ruby’s idiosyncratic unless syntax – so a simple command checking for undefined “null” variables becomes much more exciting.
(unless €name != null)
Rendle’s language will also require all programming statements to end do not with a semicolon, but with the ancient Greek question mark symbol. (Which looks identical, but will be treated by Rendle’s language as an entirely separate character.)
“We will be selling keyboards with a special key that has a Greek question mark on it,” Rendle told his audience. “And we’ll put it right next to the semicolon.” And you will only have to remember which of them is which.
Easy as Pi
As the conversation continued, Rendle’s language became more and more delicate.
- A line starting with white space is considered a comment – but only if the number of spaces divided by two leaves a remainder of one. As he told the audience, “So if you start a line with a tab and a single space, or a tab and three spaces, or just with seven spaces, then everything after that is a comment.”
- The result of dividing 22 by 7 is the pie emoji.
- Where Visual Basic uses 16-bit integers by default (with a separate syntax for 32-bit and 64-bit integers), Rendle’s language simply limits programmers to…17-bit integers.
- Its language is neither an interpreted scripting language nor a compiled language, but rather a semi-compiled language like Java that generates its own intermediate intermediate code.
- Channel management is even more ambitious. Instead of using a classic 8-bit character format, Rendle’s language will support 256-bit characters, a design decision that “allows us to have a character for every subatomic particle in the solar system.”
He added: “I will create a website where you can upload any bloody image you like, and I will return the UTF-256 encoding for it, then you can use it in a string”, did he declare. His public.
“And then all the programs in the world will have to come to my web server to download the character.”
Error messages from hell
The interview included some serious opinions. For example, Rendle’s language borrows nothing from Rust, “because Rust is very close to being the perfect language”. (As Rendle sees it, even Rust’s error messages are “like a compiler hug”.)
“We don’t do that,” he promised the audience. Our error messages are going to be hell!
For declaring variables, Rendle’s language implements the most boring form of typing – neither static nor dynamic, but its own form of gradual typing (using the “hints” type available in Python). Specifically, Rendle’s language includes a new type-defining keyword syntax:
And in addition, the language not only does type checking but also grammar-checking, generating a compiler error if the keyword appears before the type that begins with a vowel. (For these cases, Rendle’s language provides an alternative keyword,
isProbablyAn.) When defining the type of a multi-variable array, the syntactically correct keyword changes again, to
And for ambiguity, the compiler error is
The spirit was contagious. The conversation ended with Rendle asking the audience what they think of programming languages, prompting an audience member to respond, “I despise MATLABand it returns any line that does not end with a semicolon.
Rendle has hinted that he will add it to a future version of the language – although he may be adding a unique twist to his own language. “Or a Greek question mark,” he mused.
Another audience member always hated how a multibranch
SWITCH requires each branch to end with its own
BREAK statement – and suggests that Rendle also make them mandatory for each of its languages
UNLESS statements. And also the end of each function.
“I like that,” Rendle said, adding, “You’re a crooked pup.”
Make languages worse
When Rendle’s speech circulated online, it sparked discussions about what other horrible features could have been included.
Rendle says fans sometimes even come directly to him with their suggestions. “It’s really gratifying to have this kind of engagement with such stupid talk,” he posted recently. on Twitter.
But all of this is just for fun. Rendle gave the first speech in 2014 — and told his 2021 audience that he was horrified when two members of the public then attempted to create GitHub repositories for the language.
Its real purpose is a malicious parody of the tools programmers use on a daily basis and the larger quirks of an ecosystem that seems to offer perverse incentives and arbitrary rewards. At one point, Rendle even offered his own variation on the aphorism if it ain’t broke, don’t fix it.
“If it ain’t broke, you should fix it until it breaks. And then run away.
And then he proudly gave advice to his dazed audience: “Hire me.
For more on programming languages, check out this recent New Stack podcast on Java and its future in a cloud-native world.
Featured image by scanlime via Creative Commons.