David Fearon

David Fearon  David Fearon asks the obvious question about Google Go: what is it actually for?

Just when you thought it was safe to commit to a programming language.

It was enough to have to choose between C, C++, C, Java, Python, Peri, Ruby, Rash/Flex, Lisp. Pascal, BASIC, FORTRAN, Smalltalk, or dozens of others. Google decided the world needed another one. The result is Go.

You can certainly argue that a new language might be a good idea. As the developers of Go point out, there hasnbeen a major new one for more than a decade. And since Java was released back in the mid-1990s, the world has certainly moved on.

Things, however, donget off to a good start with Go. Youthink a search company might realise that assigning a two-letter English verb as the name of a new language doesn t exactly make details about it easy to find. You d also think it would pick a name that hasnbeen used before —the Go! programming language already exists. Mind you, you d also think that Microsoft might have realised that using the hash symbol in the name of its own most recent language would screw up references to it In URLs and wikis everywhere. Step forward C.

There are plenty of other reasons to remain entirely unexcited about Go. There is, for instance, no IDE (integrated development environment) to make It easy to write applications, and no graphics library for producing a traditional graphical user interface.

David Fearon So what is good about Go? The first advantage mentioned in the limited literature available at http://golang.org is that itfast. But not fast in terms of speed of your finished program: fast in terms of the time it takes a developer to compile a Go program into executable code. This struck me as a peculiar thing to fixate on. If youa Linux person who likes installing packages by compiling them first from the source code then youknow it can sometimes take a while. Fora locally developed application, though, Irarely had to wait for more than a few seconds for compilation.

Then again, Inot a professional programmer developing heavyweight applications, so I spoke to someone who is. Huw Collingbourne, one of PC Proregular contributors, is a developer by day (www. sapphiresteel.com). Huw tells me his Amethyst Flex IDE project "now contains 18 separate C projects. I lost track of the number of individual code files —many hundreds —and incremental compilation typically takes a few seconds. Rebuilding all 18 projects takes about two minutes, but we reckon 90% of that is involved in archiving into zip files.”

Hardly an enormous time-sink then. So if s strange that Go compilation speed should be such a focus, unless itgoing to be used for building truly monumental things. Operating systems, for instance.

So could Chrome OS surprise us by being written in Go? No, it couldn't, at least not at this stage of the game. It isn't a mature language —it barely past the research stage. The compilers work, but have deficiencies and problems. And garbage collection —one of the key features of the language —displays only the merest hint of implementation.

One aspect that does look attractive Is the way Go deals with multithreading. C and C++ were designed way before multicore processors were commonplace, and even Java, which was designed with threading in mind, makes a fuss about it. Creating a lava thread produces a significant hit on CPU and memory resources. Go, on the other hand, appears enormously capable of running separate threads of code inside what it calls go-routines. These are lightweight in setup, memory requirement and " cost. If you have more than a few dozen simultaneous threads in a Java application, you re probably about to run out of memory. Go is able to cope with tens of thousands.

But what is it actually for? Well, despite its youth there s already support to make it easy to produce HTML output; perfect for an application delivered through a web browser. There are function libraries providing network support, and ready-made HTTP server and client routines. You can implement a simple web server in a few lines of code. For contrast, let me tell you I once wrote a web server in Java, just for the heck of it: the job took me three weeks.

And here the most telling part: there no Go compiler that will run under Windows. The only operating systems supported are Unix derivatives —Linux and Mac OS X. Guess what? Chrome OS will also be a Unix-based operating system.

So, Go is currently nothing more than a curiosity. Come Chrome OS, though, you might just find yourself brow-beaten into getting to grips with it. Because Google could decide that, as well as having the dominant search engine and operating system, it wants to own the dominant language too. And what better way to achieve that than to give the best support for Chrome OS application programming to Go.

Share This Post

Recent Articles

Leave a Reply

You must be Logged in to post comment.

Powered by Remotesupport.com