|
|
|
|
|
by pbsd
4636 days ago
|
|
I agree, I honestly don't see where the expressiveness claims of Go come from. I've always put it in the Java-like bin of languages (which is not necessarily a bad thing). I suppose the one thing that Go does well (compared to C++ or Java) is builtin concurrency and communication across tasks. |
|
I'm a Java-literate C/C++ programmer. I would avoid writing straight Java code at all costs; I find it immiserating. Here are some reasons off the top of my head that Golang is more pleasant to work in:
* The syntax is deliberately streamlined, including implicit declarations, semicolon insertion, lightweight expression syntax, the capital-letter-exports-a-symbol thing
* It has fully functional idiomatic closures
* Interfaces get rid of adapter class BS
* The table type (maps, in Golang) is baked into the language, like Python, not a library, like C++ and Java
* Clearer, more direct control over memory layout; data structures in Golang feel like C
I don't know if Golang's standard library is that much better than Java's, but it was obviously designed carefully by and for systems programmers, so I find it remarkably easy to work with.
It also feels like a much smaller system than Java. Almost every time I write a significant amount of Golang code, I find myself answering questions by just reading the standard library source code. It's easy to get your head around. I've written compiler/runtime-level code for the JVM and I still don't have a great grip on all of Java.