Basic Knowledge of Golang for beginners

Designveloper
4 min readAug 29, 2019

From the beginning, when people started the first steps of working with machines and computers, a lot of successes were witnessed. One of the most important achievements in today’s technology is the programming language, which has opened a new era of communication between humans and computers.

GO was born as a big step in the new technology era. Standing among the thousands of newly born languages, GO still gains a lot of concerns.

What is GO Language?

GO Language (or GO, GOLang) was internally created and developed by Google (“GO” was from “Google”) in 2007 before being published and becoming an open-source in 2009. GO has been the main language in order to build a lot of Google products.

As we all know, a computer is separated into two main parts which are software and hardware (firmware is an optional component). Since programming with languages such as Java, C#, or C++ can only manipulate and operate with software elements, it is a waste that we cannot optimize the strengths of hardware elements (which can only be modified by the operating systems — OS).

GO has been a new approach to multi-core processing beside operating system. Applications programmed by GO can access to multi-core processing to utilize all the hardware resources, which can help the processing become faster.

Why should we “GO”?

As you can see that there has been a huge range of languages, so why should we need another new kind of language? When GO was first released, everyone doubted about it, since GO has been for back-end components (server, database, etc.) and back-end components were known to be built from complex and detailed languages such as Java. However, GO was much more simple, thus it went against everything we had known. Years by years, GO has proved that it is worth learning and developing.

GO supports Linux, Mac OS, and Windows. Some languages are suitable just for some operating systems, and people find it difficult to simulate or compile the languages in other operating systems.

GO is easy to learn, as some people may afraid when approaching a new language, GO has inherited from C, C++, and Java their structure. Even more, GO is much more simple and “freestyle”.

Here is a simple example of GO’s program:

As you can see from the above example, the program will print the number from 1 to 5 on the screen and the program does not need to declare any variables. The GO structure and syntax is something combined from compiled languages (Java, C) and interpreted languages (Assembly — languages that can interact with hardware components).

  • GO is fast. Although GO is a compiled language, its syntax is as similar as interpreted languages, thus it is easier and faster to compile GO (only a few seconds to compile a GO’s programs). Compiled languages sometimes take a lot of time to compile, but it is not 100% truth worthy because the syntax of compiled languages is different from interpreted languages (machine languages), thus there might be some mistakes.
  • GO is “small”. GO is new, thus there are not many tools that support GO, the libraries of GO are not too many. Therefore, GO is “small” and easy to install. But do not worry since GO can “borrow” libraries from other languages ranging from compiled languages such as C or Java to operating system as Linux low-level, cgroups or namespaces.

GO’s disadvantages?

Nothing is perfect and so is GO. As a new generation of language, we still have a lot of things to do with GO.

As mentioned above, GO lacks tools even though GO can “borrow” from other languages but it will go against the purposes of GO (everything needs to be fast and simple) since it maybe not “smooth” for GO to use them.

In order to strengthen the power of GO to the maximum level, we will need to change a lot of old network facilities to new ones, and that could be really time-consuming (not mention that we will need a lot of money too).

GO’s programs sometimes are huge abnormally because GO is not completely optimized as older languages.

Last but not least, since GO depends on hardware components such as kernel or driver, if we have a powerful hardware system, GO can run smoothly but if we lack those good components, GO could perform some unnecessary latency or delay.

More importantly, where to start to learn GO lang for beginners?

Since GO is new, there are a lot of sources yet not verified on the Internet. It is suggested that https://golang.org is great whether you are a fresher/junior or a senior.

golang.org is supported by Google itself and it is official. A lot of experts and professionals even the creators of GO have been joining this site to help learners. Therefore, you can easily contact them via forums or chat channels.

Conclusion

We have already known that GO is new, thus there is a lot of things in the future that we have to work in order to improve GO. There are still some issues about GO but people and companies all over the world have started to accept the fact that GO is a powerful and potential language.

Learning to GO is an opportunity yet a challenge since everyone might choose a safe way (learning “old but gold” languages such as C or C++). However, learning GO from now can make you become a pioneer and you can even become the first person to master one of the most potential languages in the world.

--

--