[ $davids.sh ] β€” david shekunts blog

*πŸ‘Š When someone bashes Go, dad comes to be \bullish**

# [ $davids.sh ] Β· message #163

πŸ‘Š When someone bashes Go, dad comes to be *bullish

I stumbled upon an article where, in my opinion, they mindlessly trash Go. And I would have passed it by if not for the number of likes and YouTube video breakdowns...

I won't let anyone bully my baby.

The author's complaint: "Too little syntactic sugar, don't want to write by hand, this was invented by old-timers who don't want to look beyond C"

Also, he, like a standard author of such an article, intentionally provides distorted examples, and in contrast, offers the D language... well, let's skip these details, they are typical of many articles of this kind (but why D... what a strange and absolutely crazy choice...)

**My response is as follows:

– The number of lines of code should not be a measure of the quality of the codebase.

**More often than not, additional lines are a more detailed explanation of a thought from 1 line, which can be more compact, but much less understandable (example, if vs ternary).

Yes, when you're writing your own code, you want to use a beautiful ternary, possibly even double or triple, but every time you come across such a construct written by someone else, your butt will catch on fire.

That's why code readability is more important than its quantity, and Go with its concise syntax forces developers to write such code.

– You don't NEED syntactic sugar, OOP, generics, and the like to make an application with fast IO and not deal with memory management

Another of the author's complaints: "It was made by people who don't want to learn anything beyond C" – on the contrary, it was made by people who have learned so many languages that they understand that C and procedural programming are enough to solve massive IO issues in a maximally high-quality, simple, and productive way, without dealing with memory issues, thanks to the built-in Garbage Collector, which is what Go was designed for.

All of the above may be extremely convenient for writing complex business logic (welcome to C#, Java, and even TypeScript), but it's not necessary for the tasks that Go solves perfectly.

Although I really miss Union types and Pattern Matching 😒

– A truly "smart programmer" (as stated in the article title) values simplicity

The less brainpower you spend on parsing and understanding each line, each word, and each symbol, the better, because you free up memory and focus on more complex things. Because more complex than the code itself is the logic behind it, even more complex is the chain of logic of the entire codebase, and even more complex is understanding the logic of a set of codebases divided into different applications.

I'll be happy if my language doesn't take up too much of my energy to realize what's going on in it, and Go handles this perfectly.

Conclusion

Undoubtedly, there are no perfect languages, but there are languages that are very good for certain tasks, such as Go and the web, or Go and cross-platform utilities, or JS and eating crap

Everyone, powerful pumping πŸ₯±

  • @ Kirill Arutyunov Β· # 332

    Here's the thing about JS being good, but PHP is a whole different story...

  • @ Arsen IT-K Arakelyan Β· # 333

    You're an expert in Node.js and JavaScript/TypeScript, why bash JS like that? 😏

  • @ [ $davids.sh ] Β· # 334

    That's the whole point) It's like if you're Afro-(American/European/...), you can use the "black card," it's the same thing here.

  • @ Arsen IT-K Arakelyan Β· # 335

    What’s up with political correctness?)
    Use a Ukrainian/Belarusian word, and mention that Afro folks aren’t just Americans)