Saturday, November 14, 2009

The Go Language

So there is a new language in town. Having gone through all of the docs I have to say it looks interesting. The need to destinguish between new and make is a little messy, the language FAQ agnoledge this however.

I like the type system, with the implicitly implemented interfaces. It does look like Go programs will involve quite frequent casting. Ditto for the built in concurrency primitives, and I expect that most programs will make quite frequent use of them. Where in Pthon I might use a generator I could well see myself using a goroutine in Go, and getting my generated items from a channel.

A lot of effort has been made to make the language terse, which is a nice feature for a low level language to have. And yes making switch statements default to breaking at the end of each case unless told otherwise. Thank you finally a language that reflects how switch is actually used!

Personally i don't see why they didn't just call the looping construct loop, rather then for. seeing as it is a general purpose looping construct that can be invoked in several ways that look nothing like a traditional for loop. Still this is a minor thing.

What does look certain is that Go programs aren't going to look much like C or java, once enough people learn how to use the language natively. The basic constructs are just different.

Now that I've gotten this far its time to try some actual programming in Go. To this end I've retrieved the list of 99 Lisp problems and I'll see how I go in solving them using Go. Step one will be to build a linked list typo work with. It will be interesting to see how much mindshare Go can capture. And when we can expect a Windows version, lets face it lack of Windows support is glaring omission at present, even if I don't use Windows I still recognise its importance in the marketplace. (Now there's a scary thought Go.net ... its only a matter of time i suspect.)

1 comment:

ginseng said...

I have heard something about that goggle is processing one programming language on its own code. It is the mixer of C programming language and python programming language. It is easy, speedy, concurrent, open source, safe for memory & implementation.