4 ms·
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 (
by coldtea 11y ago
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.
- amelius 11y agoThe 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.
- anjanb 11y agosounds like a cool idea. somewhat like wasm (WebAssembly) ? Are there plans to fork go and build generics on top of it ?
- threeseed 11y agoSomeone tried to get Go running on the JVM: https://code.google.com/p/jgo/ 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.
- danieldk 11y agoBut 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).
- danieldk 11y agoAlso, C has macros, which makes it easier (but ugly) to make 'generic' data structures.