News for hackers. Stuff that matters.
Re:Golang data structures by coldtea on Saturday July 04, 2015 @05:38AM (#9829729)
The lack of Generics is getting embarassing (and the suggestions, such as "source file generation" even more so).

With C, which is custom-data-structure land (and besides pointer use is encouraged) you can get by.

But Go purports to be safe and modern and uses a GC.

Re:Golang data structures by amelius on Saturday July 04, 2015 @05:56AM (#9829755)
The runtime architecture of Go is really nice (goroutines, concurrent GC). But, indeed, the generics are missing.

Therefore, I think they should make Go suitable to be used as an intermediate language (the compiler would become a back-end). Having Go as a compiler back-end could spawn a lot of interesting new languages.

Re:Golang data structures by threeseed on Saturday July 04, 2015 @07:02AM (#9829839)
Someone tried to get Go running on the JVM: https://code.google.com/p/jgo/

The JVM can support goroutines (similar to Quasar Fibers) and the various GC implementations are significantly more advanced than what Go has. But I suspect Go is popular mostly for its simplicity than features.

Re:Golang data structures by danieldk on Saturday July 04, 2015 @02:13PM (#9831005)
But I suspect Go is popular mostly for its simplicity than features.

Definitely. I think there are a couple of reasons:

* It's familiar to anyone who knows C-like languages.

* The tooling is really good for such a young language (go get, go fmt, goimports, pprof, etc.).

* Java's tooling is still lightyears ahead, but a significant chunk of programmers dislikes the JVM for various reasons.

* It integrates well with the UNIX/C environment.

* Simplicity (someone mentioned in a thread a couple of days ago: Go seems to look what C++ does, and then does exactly the opposite).

Re:Golang data structures by anjanb on Saturday July 04, 2015 @06:15AM (#9829780)
sounds like a cool idea. somewhat like wasm (WebAssembly) ? Are there plans to fork go and build generics on top of it ?
Re:Golang data structures by danieldk on Saturday July 04, 2015 @05:59AM (#9829761)
Also, C has macros, which makes it easier (but ugly) to make 'generic' data structures.