3 ms·
> I couldn't say exactly why it got popular. Probably because it has the backing of Google.
by opmac 5y ago
> I couldn't say exactly why it got popular.
Probably because it has the backing of Google.
- ts4z 5y agoI disagree. Go provides a low-runtime way of writing programs, like C, without having to resort to managing memory and threads super carefully. No VM, no interpreter, fairly straightforward to imagine what the compiler is doing. You can do the same work in Java but you can't statically link the JVM. You can sort of do these in Python, but the compiler story is murky at best, and the language isn't as type safe.
- saghm 5y ago> No VM, no interpreter That's not quite accurate; there is a runtime, it just gets statically linked into the binary instead of needing to be externally installed
- throwaway894345 5y agoNo, Go literally doesn't have a VM or an interpreter. VMs and interpreters are runtimes, but not all runtimes are VMs or interpreters. Go executes native code.
- eternalban 5y agoAny language that performs work not directly specified by the user has a runtime. Go's runtime is minimal and concerned with two important aspects of the language: scheduler, and garbage collection.
- throwaway894345 5y agoYes, I understand. I was responding to someone who was arguing that it was inaccurate to say that Go lacked a VM or interpreter. Yes, Go has a runtime, but that doesn't imply that it has a VM or interpreter (it doesn't).
- earthboundkid 5y agoCounterpoint: Dart.
- nauticacom 5y agoI thought of Dart as a counterpoint, but if anything it's actually more proof. Dart kinda failed as a language in the browser because Google didn't really push it, and when they did it got pushback. Now that they've repurposed it for building mobile apps, it's surprisingly popular. Sure, not Go-levels of popular, but leaps and bounds more popular than if it were some scrappy OSS project. And it's in a similar camp to Go: reasonably uncontroversial (it's basically Java), large suite of libraries, backed by Google.
- throwaway894345 5y agoGoogle has never meaningfully "pushed" Go. From Google's perspective, Go is just a backend language that's a good fit for some internal Google applications. I don't think they care tremendously that other people use it, although they certainly don't mind. On the other hand, Google strategically wanted a robust frontend ecosystem (hence investing heavily in Dart and V8) because getting more applications off of PCs and onto the web meant more user data up to collect and more opportunity to serve ads. In particular, I don't understand how Go is more Java-like than Dart. Feature | Java | Dart | Go -------------------+------+------+---- jit compilation | yes | yes | no inheritance | yes | yes | no classes | yes | yes | no nominal subtyping | yes | yes | no native binaries | no | no | yes static artifact[0] | no | no | yes static typing | yes | opt | no value types | no | no | yes What other features do Java and Go have in common that they don't also share with Dart? [0]: For sanity's sake, we'll assume this means "are static artifacts common/default" and not "is it technically possible to produce a static artifact" because for some sufficiently broad definition of static artifact the answer can be yes for any language (e.g., Docker images).
- deleted 5y ago[deleted]