Transcription
Listen carefully. Go is the new PHP. Summer, summer, summer, birds, short pants, and I have freckles. You, Mora, we are home from morning till dawn, drinking juice and having fun quickly.
Red, summer, summer, summer, sweet air. I have this feeling that over time, all programming languages start being called the new PHP. During my time in IT, I heard this about Java, saying Java is the new PHP. I also heard it about JavaScript, saying JavaScript is the new PHP. And now, Go—Go is the new modern PHP.
However, such comparisons carry no positive connotations. Usually, it’s the opposite; a programming language is compared to PHP if it seems to be bad, and there’s nothing in common with PHP. For example, if we take Java, aside from both PHP and Java being high-level languages, they have nothing in common. JavaScript has more similarities with PHP, but it is still a completely different programming language. So why is it suddenly considered the new PHP? It’s not very clear.
In fact, the phrase about Go wasn’t coined by me. I found it online, and there was a clear explanation of why someone thinks this way. The main complaint in comparing Go and PHP is that both programming languages have poor design.
So, what exactly is wrong with Go, and why is it claimed to be similar to PHP? The author of this take provides several reasons. The first is the invention of the wheel. It’s hard to say what exactly was invented for PHP; I’m sure there are things that were created despite existing analogs. But when it comes to Go, there are a couple of things that were somehow reinvented, even though they could have been done like everyone else.
For example, the compiler. For some reason, they wrote their own compiler for Go instead of using LLVM. Why they wrote their own, I don’t know; you’d have to ask the language’s author or search Google. Maybe they wanted to make it faster or consume fewer resources. There could be several reasons for this decision, but they could have just used LLVM.
Now, regarding the second claim about reinventing the wheel, I agree. Have you seen the default date format in Go? It’s a real mess. As the author of this take says, it’s as if a drug addict came up with it in a terrible haze. There’s a whole range of different formats used, starting from year, month, day, and time, to year, month, day, timezone, and all that, to make it easier to navigate and format what you get. But in Go, they decided to do it their own way, and we end up with the monstrosity we have now.
Maps in Go seem like a great feature, but they work differently under the same usage. If you pass a map to a function, you pass a reference to that variable. If you pass a slice, you pass the value. Why is this the case? Nobody knows.
For example, slices can be used without initialization, but maps cannot. There’s also very strange behavior that I haven’t encountered anywhere else. You can create a key for a map, say N, but you can’t access anything beyond that key. The entire map ends up broken because you can’t delete it either. Instead of fixing the error, the creators of Go just added a method called Clean that allows you to delete everything.
So, that’s the strange solution they found. In their article, the author also made a whole section called "Other Nonsense," and here are four points I want to quickly mention because they are really strange.
There are public methods, for example, panic, and they are accessible to everyone. But do you know what’s wrong with them? The way they are written. In Go, such things are supposed to be named with a capital letter, but default methods are not named with a capital letter. This means that the author of the programming language didn’t follow their own standards. So if someone else doesn’t use the standards, they do the same as the author of the programming language, and that’s bad.
Another problem the author points out is implicit memory allocation. As someone who works with programming languages where memory management isn’t very popular, it’s not just hard to understand, but probably bad.
And this phrase is just very funny, so I’ll read it to avoid any mistakes: "Go is a high-level language with low-level syntax and a lot of boilerplate code." It sounds amusing, and I wouldn’t say it’s bad. On the contrary, it seems to me that if you write a high-level language with low-level syntax, using that language should be easier. But apparently, the person who wrote this doesn’t want the language to be easy to use.
Empty interfaces and casting are things that were borrowed from PHP. And while this may not be the best thing in PHP or even one of the worst, at least it somewhat justifies the phrase "Go is modern PHP."
You can see the post on the screen. It’s in the form of a screenshot in English; you can read it yourself and agree or disagree with it. Naturally, neither I nor the author of this post claim that Go is a bad programming language. Any programming language can be called good or bad, but its main task is to solve problems and help create products, and it does that well. So, there’s no bad programming language, and it’s unlikely there ever will be.
I didn’t eat at home on purpose, and after the fourth cup of coffee, I read that I received a letter from the government. I should have covered the address with my hand. Then I tried to explain to the guys that I don’t drink.
I know that not many of you will watch until this point, so I’ll share this only for those who made it this far. It’s a small allergic digression because I need to vent. I had an awful day, and I just wanted to tell someone about it. I could have called my wife or another friend, but they are adults with their own problems, and I didn’t want to burden them with my bad feelings.
For you, I’m just a guy from the Internet, so this will be a rant from a guy online. So, here it goes. It all started not even today, but yesterday evening. I’d say everything happened within a day. Yesterday, I received a notification that today the energy company would withdraw 1.22 euros from my account. That’s normal. You know, for a whole year, you pay a certain amount each month, and at the end of the year, they check how much you’ve spent. They either refund you if you overpaid or ask you to pay more if you spent more than you prepaid.
I was quite surprised because I thought they were taking around 160 euros from me each month, which was the amount they mentioned when I signed the contract. I signed the contract with them last year. I couldn’t understand why I had to pay more. We practically never turn on the heating because it’s warm in the apartment. It’s never really cold outside. If it gets really cold, our neighbors heat their apartments, and that warms us up because we live in an apartment building.
So, we only turn on the heating sometimes to dry our shoes quickly, and maybe a couple of times during the winter on super cold days. So, it’s unlikely we would have accumulated such a debt from the heating or anything else. I went to check what happened, and it turns out, for some unknown reason, they changed it from 25 euros a month. So, this debt should have been around 160 euros, and it just accumulated.
So, that was normal; I just hadn’t paid attention to it. Today, they withdrew that money from me, and I was left without money. Not that I have no money at all, but I don’t have the money I planned to spend this month. I thought I would live on around 1,600 euros for the remaining 20 days until payday, and that amount would definitely be enough. But today, they took 1,522 euros, and now there’s practically nothing left in my account.
Of course, I won’t starve because I have savings and a credit card. I can either use the money I saved or borrow from the credit card, which is essentially the same thing. It’s just unpleasant.
The second issue is how my workday went in the office. It was actually completely useless. There were a couple of calls, a few meetings, and some tasks that were absolutely uninteresting and could be solved very quickly. I don’t know; it just wasn’t great, to be honest. I sat at the computer and didn’t understand why this day was happening.
The last straw in this sea of my indignation—or I don’t even know how to say it—was when I sat on the train from Utrecht to Amsterdam and received a message from Netology that I had a lecture starting. Would I be attending? As a very responsible person who rarely arrives late without a reason, I started feeling super uncomfortable when I saw this message. I just forgot to add today’s lecture to my calendar.
This kind of thing has almost never happened to me in all my 5-6 years with Netology, or however long I’ve been working with them. It’s happened only a couple of times. So, with my not-so-great mood, I looked at this message and didn’t even know how to respond. Naturally, I wrote the truth that I forgot to add it, and all that, and my mood just completely dropped.
Everything piled up: a useless day taken from my life, I was left without money for another 20 days, and I didn’t even attend the lecture. In short, I ended up being irresponsible, and right now, all of this is really gnawing at me. I’ve lost my appetite; I don’t want to eat. Although usually, I eat well in the evening.
As I said, I just needed to vent, so that’s it.