3 ms·
If you're coming from Ruby, you'll feel right at home, perhaps less so if you're coming from JS. What I found surprising and fun about Go is just how similar it
by grey-area 14y ago
If you're coming from Ruby, you'll feel right at home, perhaps less so if you're coming from JS. What I found surprising and fun about Go is just how similar it is to scripting languages in style, and how much baggage it drops from C (header files, explicit types, pointer arithmetic etc).
The lack of header files, clear and simple syntax, minimal language core, and predictable standard library all combine to make it feel very like a compiled Ruby, though obviously there are differences. The main differences coming from a dynamic background are the type system, interfaces, imports and packages (no circular imports), and the lack of dynamic loading - everything is loaded at compile time. Interfaces feel a little like duck typing with checks on whether a type really does quack like a duck at compile time!
If you mean writing a web app, it's not really as mature as other ecosystems in terms of support for this, but would be great for a smaller, minimal web-app, if you mean writing a web server from scratch, go is a great place to start, and even has a good example for you to look at in the built-in server:
http://golang.org/src/pkg/net/http/server.go http://golang.org/src/pkg/net/http/server.go