Why Choose Golang?

As our business has matured, we have found we use certain programming languages more than others. Our team are experienced in JavaScript, Angular, PHP, HTML and many more, and regularly use these when requested to by clients. But we find ourselves using Go (aka. Golang) with increasing frequency. So, why choose Golang?

Let’s start by saying this: just because we gravitate to using some languages more than others doesn’t mean they are necessarily better. As in many other industries, you choose the right tool for the job. For us, especially when working with AWS microservices such as AWS Lambda, Go fits our needs perfectly. This article will explain why we use it, and lay out its pros and cons.

Before we begin, some history. Go is an open-source programming language and was created by three developers at Google back in 2007. It launched in November 2009, with the first stable release in 2012. Since then, it has continued to grow and develop into what we use today and is still constantly evolving due to the community which has developed around it.

Pros Of Using Go

  • One of the major concepts during its development, Go can harness multi-core processors to make an application do multiple tasks simultaneously.
  • It’s fast to learn, run and compile. It’s not the fastest language out there, but is still at the upper end of the spectrum.
  • Testing and Maintenance. It has built-in features to maintain clean code, as well as automated package testing.
  • Cross-Platform. Go has been built to take account of cross-platform compatibility, whether you use Windows, MacOS or Linux. It also works with an ever growing number of libraries thanks to the user community and third-parties.
  • Garbage Collection. The garbage collector automatically frees parts of the program’s memory when they are no longer needed. It’s really fast too, which improves the performance of applications built with Go.

Cons Of Using Go

  • We think it’s a positive, but one of the most common issues developers have with Go is that it’s too simple. Maybe you lose some advanced flexibility because of this, but the trade of is that there is less chance of human error.
  • Error Handling. Errors are defined differently from other languages, which many don’t like, but the justification is rooted in programming language theory. While there may be issues, the community is constantly working on ways to improve, so this will evolve over time.
  • Speaking of time, as Go is a relatively young language there are many kinks which are still being ironed out. But as it is backed by Google and a large open-source community, it is on a solid path to maturity. In the meantime, don’t be put off from trying it by the negatives. The pros of using it are absolutely worth it.

Learn How Go Can Help You

Now we’ve investigated the basics, let’s revisit the question: Why choose Golang?

Within Kew Consulting, we have found Go to be particularly useful because of its speed and suitability for use with AWS, especially Lambda functions. For the development of many applications it can be a great choice, though as we said before, not for all. But it’s definitely the right tool for many of our jobs!

If you would like to learn more about how our Go expertise can aid your project, contact us now to learn more.