The Worst and Hardest Programming Languages to Avoid Like the Plague
There are lots of awesome programming tutorials out there to get you started with coding. But before you dive into them, you’ll have to answer a very difficult question: Which programming language should I learn?
In this article, we’ll approach it from the opposite end: Which programming languages should you avoid?
1. Esoteric as %^&*!
Let’s start with an easy one. Esoteric programming languages (or esolang for short) are designed to push programming to its limits of simplicity. In doing so they succeed in making it incredibly complicated.
While this seems like a contradiction in terms, a quick look at the unfortunately named Brainf&*k language:
This monstrosity is functional, Turing-complete code. The function of this program? It prints Hello World! to the screen. Simple, isn’t it?
The language consists of eight characters, which move the data pointer within the program array, and modify or output the data held in each position. This all adds up to a simple language which is an absolute mind destroyer to use. Hence the unfortunate name. By the way, Brainf£$k is not the only esoteric language with a “colorful” name, so be curious at your own risk!
Brainf^&k is one of the better known esoteric programming languages, though many more can be found. Perhaps you want to build a program using the one-liners of Arnold Schwarzenegger? Chef is particularly notable as the code you write ends up reading like a recipe.
Esoteric languages are designed more like a fun challenge to programmers than for everyday use. As a general rule, these languages are Turing Tarpits and will cause more frustration than anything else if used for actual programming tasks. In the same way that going over Niagara Falls in a barrel isn’t necessary, I’m sure some of you will program in esoteric languages regardless!
This is where things may get contentious. PHP is a server-side language designed for web development, so you can use it to build a simple PHP website . Originally released in 1997, PHP quickly took over the web. You’d be hard pushed to find any large web entity that doesn’t use PHP. PHP introduced the concept of Dynamic Websites, allowing users to query databases in real time rather than loading static pages on each interaction.
A recent Stack Overflow survey shows PHP as the ninth most popular language, and there is still a considerable demand for PHP developers. So far so good. Widely used, in demand, long-standing, what isn’t there to like?
Well, depending on who you ask, quite a lot!
PHP wasn’t meant to be a language and grew piece by piece rather than with a general structure. This makes learning PHP a frustrating experience.
An example of this provided by aptly named phpsadness is PHP’s get function:
These little inconsistencies in the naming of in-built functions are part of a much larger problem. Small differences in syntax and semantics make PHP difficult to learn when coming from another language.
In an age of programming language polyglots, these issues might not be a big deal to you, but it is enough to make some developers run for the hills.
One more thing before we move away from these types of inconsistencies. In PHP, function and class names are not case sensitive, but variables are.
The Ternary Operator
Whether it is a product of PHP’s ad-hoc structure or the mad whim of one of its creators, the ternary operator in PHP is baffling. Consider this:
$a = 11; echo ( $a == 10 ? 'ten' : $a == 11 ? 'eleven' : $a == 12 ? 'twelve' : $a == 13 ? 'thirteen' : 'something else'); echo "\n"; //this code prints 'thirteen' to the console
As you can see in the above example, PHP does strange things with ternary operators. In almost all other languages you would expect this code to output eleven. PHP disagrees.
This strange behavior comes from PHP using a left associative ternary operator. This somewhat mind-bending behavior is utterly unintuitive to many programmers, and even after reading a detailed explanation of how it works, it’s still baffling.
PHP is still used widely, and many people claim it has improved hugely over its 20-year tenure.
If you want to create your own WordPress plugins, then it’s certainly worth learning. There are great resources out there to get you started learning PHP , and its popularity means you will likely land a development job once you have.
The real question is: with so many other languages out there, and the rise of other frameworks like node.js and Ruby on Rails, do you really want to?
Why does it belong on this list? Well, the darling of front-end has a few quirks.
Automatic Semicolon Insertion
If you are familiar with Java or any of the C family programming languages, you’ll know that semicolons are used to denote the termination of a statement. The interpreter sees the semicolon and knows to move on.
While this is a nice idea, it is not without its problems. Self-confessed semicolon denier and YouTuber Kyle Robinson Young makes a good case for why they should be used by beginners.
An Array of Weirdness
Anyone who has taken a beginner coding class will be familiar with arrays. They are a simple way to collect lots of data of the same type and order them to easily get it back later.
Right then. Clear as day.
A World of Programming Languages
Can you hear the sabers rattling? The angry devs ready to strike down every point made in this article? In truth, they would not be wrong. There are thousands of other cases in almost every language out there I could have used.
With the exception of the esoteric languages, each programming language has its good and bad points. As with all tools, a feature which makes one user’s blood boil is a cherished functionality to another. Semicolons may be one person’s kryptonite, whereas whitespace might keep others up at night.
For a beginner, any programming language is hard, and you should spend time learning the fundamentals of programming before worrying too much about what language to choose. Having said that, it’s important to stay informed about the latest languages that are becoming popular. Right now, Rust is the most exciting programming language to explore!
Image Credit: fizkes/Depositphotos
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.