4 ms·
Go: still better than just plain C. This seems to come up at every discussion about Go. What usually also comes up is how Rust is a much better designed langua
by josteink 12y ago
Go: still better than just plain C.
This seems to come up at every discussion about Go. What usually also comes up is how Rust is a much better designed language which solves real problems, while Go merely improves a little over C while leaving most of the same death-traps lying around.
Yet at the same time Go seems to have a much bigger adaptation than Rust. What's up with that? Are Googlers paid to create projects in Go, or are people genuinely happy to have anything which sucks less than C and stamped with a "final" badge of approval?
- imanaccount247 12y agoGo is older, so it has had more time to gain users. And go has gained users mainly from python and ruby, not from other compiled languages. People are genuinely happy to have anything which sucks less than scripting languages but still offers comparable development speed. That's where go is doing well.
- coldtea 12y ago>Yet at the same time Go seems to have a much bigger adaptation than Rust. What's up with that? Well it has to do with Rust not even being 1.0 yet, whereas Go has been stable for 5 years... Or with Rust changing some syntax in every point release for most of it's design cycle, so even early adopters had a difficult time. Or maybe with Go having Google behind it, with the increased visibility it entails... (Rust, for one, never had huge Google Developer convention sessions exposing it to thousands of devs -- or any conventions for that matter). And yet, we're already seen increased adoption for this pre-1.0 rust, major community playahs like Katz getting in the core team, more posts and libs every day, etc...
- sacado2 12y agoBeing stable for five years rather than still being under development can be seen as a feature. It is a strong selling point of Go, actually : solving actual problems rather than making a perfect language. It's a perfect example of Stroustrup's quote about languages everybody hates vs languages nobody uses.
- rakoo 12y agoAnd again, people compare Go and Rust while they have completely different goals. Go is about capturing dynamic languages' flow of development and put that on top of types and static compilation so you can improve early on performance and correctness (That doesn't even include inserting a "generic" way of coding concurrent processes). Rust is much more about replacing C++ in features (from my little-knowledge POV): provide higher-level constructs to model your problem than raw C, with a heavy control over memory for maximum correctness and performance. Rust may be better designed, yet I find it much more verbose and harder to understand than Go. While this may be a reason for the difference of adoption, a much bigger reason must be the difference in maturity.
- coldtea 12y ago>Go is about capturing dynamic languages' flow of development The only features it has regarding that is GC, built-in hash-table and type inference. Hardly the gist of what makes dynamic languages flow a fast/nice one. Plus Go was also advertised as "systems language" -- and besides, the same kind of programs Go is used for, servers, REST, network infrastructure stuff, etc, Rust will be used for too. It's not like Rust is only (or primarily) for anything much lower level than Go.
- rakoo 12y ago> The only features it has regarding that is GC, built-in hash-table and type inference. No, the real feature is understanding that a language doesn't stop at the syntax, the tooling and the environment are extremely important: - unless you want to build multiple binaries in one command, there is no need for any build helper. - hack-compile-test cycles are really short, to the point you can run simplest go programs as scripts - go has its own package manager, allowing you to manage dependencies extremely easily (not technically specific to dynamic languages, but in practice often associated with them) (Note that I'd prefer if everything was managed by my OS package manager, but we're not there yet) The go creators (and community) has spent a lot of effort in improving the overall development environment, and this is a characteristic I have seen more developed in dynamic languages (again, I'm not saying that it's tied to a type of language, but I have seen this more developed with the pythubyerlascripts) > It's not like Rust is only (or primarily) for anything much lower level than Go. It's not, It's just targeted at different problems. You wouldn't use Go to build a game engine [1] (you need tight control over memory and have some realtime requirements), and I'm not sure you need the tight control that Rust gives you over memory when you build an image processing server [2] (you'll need concurrency primitives for this) [1] https://github.com/Jeaye/q3 https://github.com/Jeaye/q3 [2] https://github.com/ReshNesh/pixlserv https://github.com/ReshNesh/pixlserv
- personZ 12y agoRust is a much better designed language which solves real problems Yet remarkably people are solving real problems with Go. Despite all of these dire predictions and pontifications on here by so many mortally offended by Go's existence, people are simply making solutions and moving on. I don't believe I've heard of a single significant solution with Rust. I mean, I'm sure one exists somewhere, but it seems that it's caught in the advocacy trap of people talking about how great it is (overwhelmingly in Go discussions, it seems), instead of building solutions with it.
- Dewie 12y ago> I don't believe I've heard of a single significant solution with Rust. Servo is pretty much the motivating application for the Rust language. So you should keep your eye on that if you're interested.
- Ygg2 12y agoI don't know what people keep comparing Rust and Go. It might be that they are both after the coveted replace C++ spot shrug. That said, Rust doesn't have any real applications, because it's not out yet. The core team pretty much states, don't build anything significant in Rust atm. It'll probably be out next year. Also Rust is a much more difficult language to grok, because it forces you to care about borrows.
- steveklabnik 12y agoRust does have two major production deployments (OpenDNS and Skylight) and we've heard rumors of a few more. (Just this the other day: https://news.ycombinator.com/item?id=8743015 https://news.ycombinator.com/item?id=8743015 ) That said, yes, before 1.0, you have to be a special kind of person to do such a risky thing. That said, Skylight can't really do it another way.
- coldtea 12y ago>Yet remarkably people are solving real problems with Go. Despite all of these dire predictions and pontifications on here by so many mortally offended by Go's existence, people are simply making solutions and moving on. Also people do that with C, C++, Python, etc etc, so no need to invent Go at all, right?
- Dewie 12y agoIn addition to the points already brought up by sibling comments: Go is centred around automatic memory management. The downside to that is that Go might not ever be suited for certain domains: the upside is that automatic memory management is good enough for arguably most domains. Now, consider that many Go developers are coming from scripting languages; using Go gives them a lot of the performance boost, without also having to worry about the lifetime of their memory. And if they were using Python beforehand, chances are that implementing everything in C/C++/Rust instead won't really be necessary for them. Go gives good enough performance. This overall comparison might be a dead end, though. After all, we're comparing languages that effectively only have in common that they seem to have been spawned at vaguely the same time. Their philosophies are totally different.
- otikik 12y ago> Rust is a much better designed language which solves real problems Well, so far it looks like Rust resolves real problems in theory. In practice, I just see much more projects made in Go than in Rust. I confess that I didn't go hunting for Rust projects though. Maybe it's the same as Mercurial vs Git. The latter is more popular, even if it's "worse", according to some.
- kibwen 12y agoThe comparison is unwarranted. Mercurial and Git were designed to solve the same problem (quite literally, even: both were conceived as an attempt to replace BitKeeper as the distributed version control system for the Linux kernel). Go and Rust were designed to solve very different problems. That people feel the need to constantly compare the two languages is because our industry is fad-driven, causing people to be ever on the lookout for The Next Big Thing lest they get left in the dust. This incessant veneration of novelty results in people who have only shallow understanding of a large number of technologies, leading to comparisons that are based only on superficial traits.