On Thu, Nov 12, 2009 at 9:12 PM, Roman Shaposhnik <ro...@shaposhnik.org> wrote: > On Thu, Nov 12, 2009 at 8:34 PM, <lu...@proxima.alt.za> wrote: >> "Go" has added a cat amongst the pigeons :-) > ... > * A ducktyping of sorts with interfaces and such. On the surface > it just saves > you a bunch of "extends XXX", but it actually seems to bridge > the gap between > dynamically typed world and a statically typed one to an extent
As a long-time Python programmer, Go's interfaces are what I find most immediately appealing as they give you the speed and safety of a compiler w/ the flexibility of swapping in arbitrary types provided they satisfy the interface. It's trivially easy compared to C++ (inheriting from a common base class--hah, try doing that w/ std::fstream) or Java (explicitly implementing an interface). This is such a common idiom in dynamic languages that it's second nature to talk about "file like" objects. And goroutines w/ channels is just icing on the cake. Although you take a slight hit vs C or C++ in terms of single threaded performance, as soon as you're on multi-core, and who isn't nowadays, Go wins. I see Go pushing C usage down even further to the embedded/kernel/bootstrap space and rapidly displacing C++ as the language of choice for developing new high performance systems--already its out of the box library is much richer than what C++ gives you, especially for network programming where standard C++ is mute. Go overlaps w/ a lot of what I've used Python for in systems and network programming. Python is very nice when it works but if you have to escape out to C for speed it quickly becomes a drag. SWIG helps but machine generated code is not fun to debug. And I can't be the first person to wonder when the Go ARM compiler will be available on Android... Interesting times indeed. John