- Home
- >
- Software Development
- >
- Comical Coder Envisions the Worst Programming Language Ever – InApps 2022
Comical Coder Envisions the Worst Programming Language Ever – InApps is an article under the topic Software Development Many of you are most interested in today !! Today, let’s InApps.net learn Comical Coder Envisions the Worst Programming Language Ever – InApps in today’s post !
Read more about Comical Coder Envisions the Worst Programming Language Ever – InApps at Wikipedia
You can find content about Comical Coder Envisions the Worst Programming Language Ever – InApps from the Wikipedia website
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 dev community, this comedic coder introduced himself as a .NET developer who’s worked in software for 30 years. “And over that time,” he said, “I’ve worked with some truly horrific programming languages.”
But then he promised to share with his audience the very worst features from programming languages “that might in other ways be very very good and perfectly acceptable.
“And we’re going to mash them all together and make the worst programming language that there has ever been in the whole of history.”
Early on, Rendle turned his attention to Python, which he calls “generally very good and very reasonable.” But then he displayed two identical-looking blocks of code, one of which throws an error because its whitespace consists of a mix of tabs and spaces. (An annoyance it shares with F#, Haskell, and Occam.)
So Rendle’s language took things even further: “We’re going to use two spaces for indentation — but if you’re indenting by four spaces, then you use a tab.
“If you’re indenting by 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’re only used sporadically, to mark the intended destinations of GOTO statements.
But, in addition, “because I am a big fan of Douglas Adams, line numbers have to be a multiple of 42.” (A significant number in Adams’ “The Hitchhiker’s Guide to the Galaxy.”)
And the increases have to happen in an unbroken sequence — so if you later insert a numbered line into your program, every subsequent numbered line’s value must be increased by 42 (with the 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 built to encourage successful coding practices, so even beginners still fall into “the pit of success.” But Rendle counters that this paradigm “doesn’t sound like any fun at all,” proposing instead an alternative design paradigm called “the booby-trapped Aztec temple of fail.”
“You should feel like Harrison Ford running away from a giant boulder and then bumping into a bunch of people pointing arrows at you with a Nazi archaeologist.”
Thus, doing simple things should be made “as difficult as we can” — while the more complicated tasks should be handed off to the programmer altogether. From PHP, Rendle adopts not just its inconsistent letter cases but also its “pointless variable prefixing.” So instead of requiring dollar signs in front of variables, Rendle’s language will require every variable be preceded by the Euro symbol. “That has the extra advantage that it’s actually quite difficult to type on most keyboards….”
“And for string concatenation, we’re going to use commas rather than the plus symbol.”
Rendle’s language also includes a command which throws a single catch-all exception with no further details. “We’ll leave it up to the programmer to analyze the stack trace and core dump to work out what it was that actually went wrong.
“That exception is going to be called HALT_AND_CATCH_FIRE
… It’s basically like ‘panic!
‘ — but much more dramatic.”
For added effect, Rendle adopts Ruby’s idiosyncratic unless syntax — so a simple command checking for undefined “null” variables becomes much more exciting.
HALT_AND_CATCH_FIRE
(unless €name != null)
Rendle’s language will also require all programming statements end not with a semicolon, but with the question mark symbol from ancient Greek. (Which looks identical, but will be treated by Rendle’s language as an entirely separate character.)
“We’ll sell 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 key. And you’ll just have to remember which one of them is which.”
Easy as Pi
As the talk continued, Rendle’s language grew increasingly tricky.
- A line starting with whitespace 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 emoji for pie.
- Where Visual Basic defaults to 16-bit integers (with a separate syntax for 32-bit and 64-bit integers), Rendle’s language just limits programmers to … 17-bit integers.
- His language is neither an interpreted script language nor a compiled language, but instead a semi-compiled language like Java that generates its own intermediate byte code.
- String-handling 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 sub-atomic particle in the solar system.”
He added, “I’m going to make a website where you can upload any bloody picture you like, and I’ll give you back the UTF-256 encoding for it, and then you can use it in a string,” he told his audience.
“And then all the programs in the world will have to come to my webserver to download the character.”
Error Messages from Hell
The talk included a few 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 hug from the compiler.”)
“We’re not doing that,” he promised the audience. Our error messages are going to be hell!”
For declaring variables, Rendle’s language implements the most annoying form of typing — neither static nor dynamic, but its own form of gradual typing (making use of the type “hints” available in Python). Specifically, Rendle’s language includes a new type-defining keyword syntax: isProbablyA
.
And in addition, the language does not only type-checking but also grammar-checking, generating a compiler error if the keyword appears in front of the type that starts with a vowel. (For those cases, Rendle’s language provides an alternative keyword, isProbablyAn
.) When defining the type of a multi-variable array, the syntactically-correct keyword changes yet again, to areProbably
.
And for added ambiguity, the compiler error is "Invalid constant
.”
The spirit was infectious. The talk ended with Rendle asking the audience for their own peeves about programming languages, prompting one audience member to respond, “I despise MATLAB, and it echoes out any line that doesn’t end with a semicolon.”
Rendle hinted that he’ll add it to a future version of the language — though perhaps adding a twist unique to his own language. “Or a Greek question mark,” he mused.
Another audience member has always hated how a multibranching SWITCH
statement requires each branch to end with its own separate BREAK
statement — and suggests Rendle also make them mandatory for every one of his language’s UNLESS
statements. And also the end of every function.
“I like that,” Rendle says, adding, “You’re a twisted puppy.”
Making Languages Worse
As Rendle’s talk circulated online, it provoked discussions about what other horrible features could’ve been included.
Rendle says fans sometimes even bring their suggestions to him directly. “It’s really gratifying to get that kind of engagement with such a silly talk,” he posted recently on Twitter.
But it’s all meant just for fun. Rendle first gave the talk in 2014 — and told his 2021 audience he’d been horrified when two audience members later actually tried to create GitHub repositories for the language.
His real purpose is a mischievous parody of the tools that programmers use every day, and the larger quirks in 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 isn’t broke, you should fix it until it breaks. And then run away.”
And then he proudly gave his dazed audience some advice: “Hire me.”
For more about programming languages, check out this recent New Stack podcast about Java and its future in a cloud native world.
Featured image by scanlime via Creative Commons.
Source: InApps.net
Let’s create the next big thing together!
Coming together is a beginning. Keeping together is progress. Working together is success.