This is a creation in Article, where the information may have evolved or changed.
The last several years, there have been an explosion of new programming languages. As a developer, want to evaluate these languages, and determine if you should is investing your time in any of these n EW languages. So when a language called Go emerged, I asked myself, is it worth looking at?
The decision to even take a cursory glance at it is answered quickly for me. Google is behind this. They know something about the challenges associated with running large scale software initiatives. They has teams of software engineers and face challenges of modern software design. Of course, that's left me with my next question. Is this a language the would only work well for Google, or would it fit my needs as well.
First, let us take a brief look at the history and premise behind why Google needed a new programming language. t Hey were facing several challenges. they had a diverse software base that consisted of numerous programming languages. moving engineers from one team to another could is difficult depending on their skills. much of the software they had written is taking too Much time to compile or test. this leads to long feedback cycles for developers, and hence slowing down the actual development cycle (some programs Could take almost a day to compile). Additionally, current languages still allowed developers to write code this resulted in have a category of common Programming bugs, such as memory leaks, NULL pointer exceptions, etc. for more information and detail, refer to the Go FAQ
The goals of the language were ambitious. Create a programming language that is easy to learn, removed the need to make complex programming decisions, had quick FE Edback cycles, Modern language features (like garbage collection), and removed categories of bugs from being allowed to EV En exist.
Due to such an ambitious goal, Google put together a rock star team which included Robert Griesemer, Rob Pike, and Ken Tho Mpson. Notable past successes of this team (individually or together) include creating Unix, Plan 9, UTF-8, and more. More information on the team and past accomplishments can is found on the Go Wikipedia article.
Ok, so I made my decision. I was going to write some Go code. I rolled up my sleeves, took a deep breath, and prepared to being frustrated for the coming weeks. From previous language learning experiences, I is fully prepared for the pain so comes with creating a development envi Ronment for a new language, reading through new code syntax this would make little to no sense, and have virtually no on Line resources to consult as it is such a new language.
I quickly realized, this is not the case with Go. Installing Go took less than a minute. Writing My first Hello World program, again, less than a minute. More to the point, I understood what I did. I was sure I was missing something. This couldn ' t really is this easy could it?
Ok, admittedly the success of installing a new development environment on my computer and getting a Hello World program ru nning isn ' t the same as writing useful, production ready software. So, yet again, I steeled my nerves, and set out to build my first program.
Since most of my background in software development revolved around web development, my first "real" project was naturally A Web project. Coming from. Net and Rails, I am unprepared for how "bare metal" Go is for a project like this. I found myself creating more foundation on Go than in these other languages. Initially, this felt like a waste of my time. Shouldn ' t some of this boilerplate code already exist? Where is my framework for Web development? I was starting to wonder if this is a good choice for a Web project.
But, I persevered. After working with Go on a production Web project for over years, it is the best decision I could ' ve made. I learned some key points about the Web development that previously I had never given much thought to.
First, the "boilerplate" that I had to write is fairly minimal in the scheme of the actual project size. It did has an inadvertent result though. I had a very clear understanding of exactly what my Web project is going to does, even at a "bare metal" layer. Also, I had 100% control over every part of my web stack. There is no "magic" that many frameworks supply. This is extremely liberating. I can ' t count the number of times a framework in other languages painted me into a corner and I had to "hack" my-to Aroun D it to make it production.
Secondly, when I am reviewing my code, I seldom thought "What's this code doing". Go is written in a-readability, and as such, your code is fairly obvious (even boring). This resulted is fewer bugs, even before I layered testing into the project.
All that being said, it wasn ' t a 100% painless experience. There were a lot of questions around the "idiomatic" from the "to write Go." I also had a lot of the standard "How does you do this" questions (for which effective Go proved to be invaluable).
Reflecting on the past-years of using Go for production development, I-consider it one of the best choices I ' ve ever m Ade. While Go isn't necessarily suited for all development tasks, it's the one I now reach first and over all other languages. The reasons is simple.
I write the most readable (translated:understandable) code I ' ve ever written on my life in Go.
Go is ' fast enough ' for anything I do.
Go scales very well.
Go is now my language of choice.
Feature image via Flickr Creative Commons.
Cory Lanou is a instructor at Gschool in Denver, where he also is the organizer of the Denver Gopher Talks.