76 points · by enneff · 16y ago · 31 comments
We're yet to see which major niche Go fills, if any. There's a growing community of people from different backgrounds using it, and they seem to enjoy it. I personally think it's a lovely language to write all kinds of code in. I recently rewrote our continuous build client in Go, and I found it a cinch to write it in clear, reliable, maintainable way. It's definitely worth checking Go out because, even though it ticks a lot of the same boxes as existing languages, it's quite different from anything else out there in many subtle ways. Certainly for writing server daemons it totally kicks ass.
It's easy to get started. The standard library is featureful (http://golang.org/pkg/), and there's a lot of good documentation (http://golang.org/doc/docs.html). As for integrating with existing code, Go comes with a tool called cgo (http://golang.org/cmd/cgo/) which allows you to write Go code that links with C code. It's pretty easy to use, and there are many third party libraries (http://godashboard.appspot.com/project) that use it. There's also Go support for SWIG for linking against C++ code.
In fact, Go looks like Java with an ActionScript 3.0 syntax.
Is there anything going on for it that Java doesn't have, or do better?
[Edit:
By the way, I keep hearing Go is an excellent language for writing daemons. Why is that? when it doesn't even have anything resembling exception handling, much less a condition system?
This is the Go spec: http://golang.org/doc/go_spec.html
]
If you think that, then you need to take a closer look at Go, or Java, or both. In short: Go compiles to native code (no VM), it has a totally different type system (no classes, not everything is an 'object' like in Java), it permits fine control over memory layout and allocation, it has powerful concurrency primitives (goroutines and channels), and more. Do yourself a favour and look beyond the syntax. It really is very different to Java (or Actionscript?! that's one of the more bizarre comparisons I've heard).
Why is Go an excellent language for writing daemons?
I think[1] that it's because Go is light-weight language, but still a "systems language". Low memory use which are important for daemons, while being significantly less complex than C++, and more typed than C.
Building daemons in Java, .Net, python, ruby, whatever really takes an impact on memory usage[2]. And python, ruby also on performance. C++, C takes a impact on development time and/or type safety.
[1]: (I haven't really looked much into Go) [2]: This of cause depends: If you already are using Java and thus have loading many of the libraries needed, I would guess the impact is significantly less.
It might not make a difference, but it can't hurt.
I'm sure something will surface eventually, and I hope soon, because everything about Go makes me very excited about programming.
e: Unfortunately I'm too busy with class and work lately to really learn more than a trivial amount of Go, but it's nice to hear news every so often so that I can remain abreast of developments and hopefully not be flat-footed when I do have time to dive in
Also, it's running a _really_ old version of Go. (http://ideone.com/spBzw) It's at least 400 revisions out of date. We intend to keep the golang.org Playground up-to-date.
There have been language changes as recently as this week. Go moves fast (although it's unusual for existing code to break).
Do you know of any that do come with source? I'd love to have a look.
http://codepad.org/about has a useful 'Paranoia' section: it was the starting point for me to build my own code-judging service. I couldn't find anything else at the time.
edit: codepad cites geordi: http://www.xs4all.nl/~weegen/eelis/geordi/
That's non-standard C++ so it might not be immediately useful, but I managed to find some nice info in the source on which system calls to consider dangerous.