Developers

Go Go Google Programming Language

Google on Tuesday announced an experimental new computer programming language called “Go.”

This combines the development speed of dynamic languages such as Python with the performance and safety of compiled languages like C or C++, the Internet search giant said.

Go is still in the experimental stage, and Google says it is still working on it.

Why Go?

It’s time for a new language because of the tremendous changes in the computing landscape over the past decade, according to the Go FAQ page.

For one thing, computers have sped up greatly, while the speed of software development hasn’t changed. Also, dependency management is a big part of software development today, but the header files used in C-type languages don’t make for clean dependency analysis or fast compilation.

Further, popular systems languages do not offer good support of concepts such as garbage collection and parallel computation, according to Google. Garbage collection is a form of automatic memory management in which a program called a “garbage collector” tries to reclaim memory occupied by objects that are not being used by an application.

Java, C# and most scripting languages require garbage collection as part of the language specification, while C and C++ were designed for use with manual memory management but have garbage collection implementations available. However, automatic garbage collection can lead to a performance slowdown for various reasons and may make performance tuning difficult.

Go supports automatic garbage collection, although Google did not say whether it has solved the problem of performance slowdown. Google did not respond to a request for comment by press time.

“Right now we are seeing a lot of interest in dynamic languages and various attempts to create new languages that have their qualities but not their drawbacks,” Al Hilwa, program director for application development software at IDC, told LinuxInsider. “Go is in a sense exactly that sort of language. It appears to be a compiled language that ultimately sits on top of C/C++ infrastructure and thus not part of any of the large high-level ecosystems out there such as Java and .Net.”

Go is a lower-level language that is trying to bring some of the advantages of dynamic languages, such as flexible typing and pointer safety, to a hard-core compiled language like C++ with its higher levels of optimization and performance, Hilwa said.

“With all the programming languages and technologies, application programming remains a highly complex and very time-consuming process,” Charles King, principal analyst at Pund-IT, told LinuxInsider. “It looks like Google’s goal is to create a programming language and interface that takes a good deal of time and effort out of the process. If they can pull that off, they can make a convincing argument for the development of another programming language.”

The Insides of Go

Go is a combination of basic syntax from the C family of languages, declarations and packages from the Pascal/Modula/Oberon family, and concurrency from Newsqueak and Limbo, Google said. Limbo is a programming language for writing distributed systems.

However, Go is a new language across the board, according to Google. It is fully garbage-collected and is designed to let programmers design applications that run on multicore computers.

Computers will likely use an increasing number of cores over the next few years. Tilera recently announced a new family of processors that includes a 100-core processor.

“Developers have run into problems creating applications for the new multicore architectures, so this is an area where Google can do something interesting and innovative,” Pund-IT’s King said.

Breaking Away From C

Go uses a different declaration syntax than C does, Google said. That’s because Go has been designed to be easy to analyze and can be parsed without a symbol table. This makes it easier to build tools such as debuggers, dependency analyzers and automated documentation extractors in Go. “C and its descendants are notoriously difficult in this regard,” Google said.

Also, Go’s declarations are backwards compared to C. In C, the type and expression grammars do not mix well, and the result can be confusing, Google said. Go mostly separates expressions and type syntax, which simplifies things.

Programmers may have to learn a whole new set of rules when they use Go. Its GC compiler implementation can be linked with C programs, provided programmers use Go’s calling convention and linker, which are different from those of standard C.

Another Go compiler, GCCGo, is a GCC front end that can be linked with GCC-compiled C or C++ programs, but Google says that’s not advisable because Go is designed to automatically collect garbage.

GCC stands for GNU Compiler Collection. It is the official compiler of the GNU operating system and has been adopted as the standard compiler by most other modern Unix-like computer operating systems, including Gnu/Linux, the BSD family and Mac OS X.

Let’s All Play With Go

For now, Go is merely an experiment, Google said. “We hope adventurous users will give it a try and see if they enjoy it. Not every programmer will, but we hope enough will find satisfaction in the approach it offers to justify further development.”

Developers will need lots of play time with Go — while the Go project was conceived to make it easier to write the kind of servers and other software Google uses internally, the implementation isn’t quite mature enough yet for large-scale production use. Google’s Go team is working on the language.

Go still faces an uphill battle. “It is hard to imagine that this is going to be the next big thing in programming,” IDC’s Hilwa said. “It’s likely Go will become one more thing in the ever-diversifying landscape of programming languages.”

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

More by Richard Adhikari
More in Developers

LinuxInsider Channels