Print

Go offers scalable alternative to C++



Alex Handy
Email
August 20, 2012 —  (Page 2 of 2)
The language itself has been hugely influenced by the community that's adopted it, said Gerrand. He stated that sweeping changes proposed for version 1.0 were shown to the community, then altered based on weeks of debate and discussion.

Outside of Google, Go is already in use at the BBC, Heroku, Pixar and ngmoco. They come to the platform not only because of its capabilities, but also because of the openness Google has had with the language.

“The biggest win brought by Go 1 is stability,” said Gerrand. “Our compatibility promise means that programs written today for Go 1 will continue to build with Go version 1.x. Go 1 is a refined and reliable foundation on which to build modern software, and will remain so for years to come.”

But Summerfield said there's another big draw for Go: Unicode support. “The thing that really made me interested was it had really good Unicode support for UTF-8,” he said.

“In C++11, they shoved in the ability to have Unicode strings, but there's nothing to manipulate them. You can waste memory by using UTF-32 in C++ [to manipulate Unicode strings]. If you have Asian characters, that forces you into UTF-32. All the string stuff in C++ is geared up for characters of standard width. Go got it right. You can read in UTF-8, 16 or 32. It has native support for UTF-8, but they don't disguise the fact they know there are bytes and characters.”

All these benefits pale in comparison to the central feature of the language: concurrency. Said Gerrand, “The primary usability benefit of Go over C, C++ and many other languages is its native concurrency support. Most networked software systems are based around concurrent processes, and Go's goroutines and channels let you model such concurrent processes in a natural and straightforward way. We've seen complex, hard-to-maintain C++ programs rewritten as almost trivial Go programs, mostly because of these concurrency primitives.”

Goroutines, said Summerfield, are a breath of fresh air for building concurrent software. “Go will multiplex those goroutines onto as many threads as it deems appropriate. That could be one thread per 10 goroutines, or one thread per thousands of goroutines. Go takes care of it. It also does garbage collection. In single-threaded programs, memory management is no problem, but as soon as you go threaded, then you've got real issues about the lifetime of objects. The garbage collector understands goroutines. This takes away the huge burden of bookkeeping.”

Go, then, seemingly is on the way to becoming routine for enterprises seeking scalability.



Related Search Term(s): C++, Go, Google

Pages 1 2 


Share this link: http://sdt.bz/36881
 
Most Read  Latest News  Resources


Comments


08/30/2012 02:38:12 PM EST

Given Google's history of coming up with projects and then abandoning them, I would feel very wary about writing anything that might last a long time in Go. I think C++11 with the right libraries offers much of the functionality of Go at the same time based on an ISO standard language

United Statesanon


close
NEXT ARTICLE
Letters to the Editor: Be wary of Go
One reader is unsure about Go’s staying power; another sees why Microsoft’s logo change is no big deal Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
MAY 2013 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?