I've done some personal projects in Go (golang?) and I respect it as a modern development language.
Rust is on my TODO list to dabble in; at least at a glance the language has a solid conception, a clean syntax for portability, and the language syntax appears to lean towards clarifying much of the undefined behavior optimization other languages get humans into trouble over.
I'd even take mono / C# over Java; but that's just because of the real world enterprise nightmares I've seen... all the fossilized versions of vulnerable libraries everywhere.
I have tried Rust, Go, Java, SML, Lisp, Javascript, and many other languages. I prefer Go in many situations where simplicity, speed of compilation, and portability are important. Rust is an interesting language with a lot of potential but the jury is still out on how wide the adoption will be. There is a steep learning curve, and the borrow checker has limitations.
One thing I don't appreciate is being lectured by pimply-faced nerds about how Go programmers should embrace Java/C++ generics into their heart as their personal saviors. I understand what Java and C++ are, I can choose to use them or not, and it's none of your business.
I'm currently using Go (and Python - we did go from Python 2 to Go, but later continued using Python 3) at work, but for all of the hoopla about it's concurrency, the reality is I'd rather have Rust's superior runtime safety and metaprogramming. A few things have impeded on Rust adoption at work:
- Learning curve. Rust is not as bad for learning as C++, but any language with strong metaprogramming and unfamiliar or relatively new language concepts are bound to be stumbling blocks.
- Ecosystem. The Go ecosystem by and large is awesome. Rust's is getting up there, though. It'd be really cool if Mozillas work with Servo meant there would be pure Rust HTML rendering and JavaScript interpreter code though! So far, impressed with minimal but powerful libraries like Iron.
- Maturity. Rust itself is pretty good, even nightly feels stable, but the developer tools are still shaping up. Until recently, rustup crashed on my Win10. Things are a lot better today, especially with the Rust Language Server.
- Marketing. Rust has a ways to go on its marketing. This has improved recently as well and I'm glad. Some underestimate the importance of having good PR for a programming language - people need to be really confident to adopt a programming language for critical components, and Go is in a place where many would trust it just because of its reputation. Also good for convincing your coworkers to give it a shot.
That being said, while Go makes concurrency easy and generally acts as a great simplistic language to develop services in, I really feel as though Rust's potential is enormous. The 'simplicity debt' of Go can be taxing sometimes.
I still love Go, though. I am just struggling to figure out which tool to use for which jobs. Though there's large areas of overlap, there are definitely things that feel nicer in either than the other.
Go has more in common with Java or C# than Rust. You can get a Rust like experience with the latest C++ standard and a lot of tooling on top. That’s the true alternative in my view.
I like Go and feel quite productive when building web services with it. It works well, but I think the Golang team neglected many advances in Computer Science, particularly the ones coming from the functional world, and the result is a nice language which could have been great. Rust appears to be that great language.
When you see Rust it's clear that they have taken note of these advances and added them to the language. Pattern Matching, Algebraic Data Types, Hindley-Milner type inference accompanied by a sophisticated type system, everything is an expression (well, most), immutable variables by default and type classes are all things that many of us who were exposed to the functional world miss sorely in mainstream languages like Java. Rust includes all of them while Golang doesn't, and C++ doesn't have some of them.
And it doesn't end there, in Rust you can also do OOP, though it's different from Java (no classes, more similar to Go). You have concurrency primitives baked into the language as in Go. You have generics as in C++ (the most cited criticism of Go, which lacks them). It lets you manage memory but in a safer way than C. And it can be made compatible with C, which lets a library written in Rust be used by other languages.
So, Rust really feels like the superior replacement of C++, and possibly C, that Golang promised at first, and it has a chance of becoming mainstream when it's stable. Rust offers all the things that Golang does, and many more. The tooling is generally better in Go, but it surely can be improved.
This is true. I'm a Rust fanatic myself, but I grudgingly admit that I wouldn't start a company with Rust. I just wouldn't trust future engineers enough. Whereas with Go, I'd never write it in my spare time, and I hate the paternalism and limitedness, but those same qualities make it an excellent quality for a company language.
If there's one thing I'd say about Go, it's that it's a language you can roll out across hundreds of junior engineers writing relatively sophisticated code and trust that you'll get a very respectable balance of (a) runtime performance, (b) developer productivity, and (c) safety (memory, thread[0], type, etc).
[0] OK, not in the strict way that Rust offers. But the simplicity and verbosity makes it easy to spot errors, the standard lib offers excellent primitives for concurrent programming, and `go test -race` sweeps up most of the rest.
I'm learning Rust. I considered Go but feature wise compared to Rust it seems really boring and plain. IMHO modern language has to have functional flavor.
Whatever the absolute merits (or lack of them) of Go, the fact is that if it's a good (enough) option for you, then it's almost certain that some language will fit your problem better than Rust.
That's mainly the conclusion I came to as well. I find Go nice to use for writing web apps and services. For anything more complex/critical and/or with a high demand for correctness, I find using Rust to be a no-brainer compared to Go.
Yes. Rust is an entirely different beast. A truly modern C-level language is something to look for.
There's no doubt Go wouldn't have been discussed here if it hadn't been done at Google. It's a really nice language, and the tooling is nice as well (far better than other new non-corporate-sponsored languages), but it doesn't address a need like Rust, or offer a way to tackle the hardest modern software development problems like Erlang or Clojure. As a language, it's not interesting either (say, like Haskell). It's not even a modern Java (like Kotlin). It's just Java. (only severely handicapped but made a little friendlier)
Then again, all this might not matter. Go is well executed, it's easier for Python devs to adopt than Java, and it's made at Google. And Google is known for making popular Java flavors, so, if Go's particular (few) strengths appeal to some -- why the hell not? There are smart people behind it, and I'm sure we can learn from Go, too.
Good to know! I've been looking at Go because it's "smaller, lighter, faster" than C# but from this description Rust might be a better next language to learn. Thank you!
The potential for Rust to innovate in a space completely dominated by C and C++ in the past decade has piked the interest of people who had never considered any other language for development.
Go, in contrast, is fairly unremarkable language. That doesn't make it bad in any way (tried and true combined with a primary emphasis in maintainable software is a winning combo), it's just that it's attacking a space which many other languages have dealt with before.
Go is a decent language, with some really good built in protections (great concurrency model), a massive standard library, and a single binary output that's immensely portable (compared to pretty much anything other than C/C++/D, etc).
Those are some of the main reasons... it's great for pushing data with relatively low overhead, and relatively high safety.
Compared to Rust, you could do very similar, but the language is a much larger break from what most are used to.
Compared to Java/C#, you don't have a relatively large runtime to install, not nearly as portable. I really like C# myself, but it's not for all use cases, and the framework need make it a poorer choice for infrastructure tooling. Also the concurrency model is more transparent in go... in C#, for example, you can use pooling techniques, but they take more thought and planning. Java has a history of huge overhead and tooling as well.
Compared to scripted languages, not worth even considering.
It really depends on your needs, but the fact is that Go and Rust are fairly new, but build with specific needs in mind and do most of them better than other options, with better safety and more transparent ease of use. Go tends to be better for networking/communications, and Rust tends to be better with interacting on system internals.
This is from a conscientious observer. I haven't had a good use case for either, but may have one for go coming up, so looking forward to that.
It's interesting to read about users of Rust trying to build different kinds of systems. The "amazing language for game development" is quite an endorsement. Even more so when you read that his colleague was able to pick up the language and contribute with no hassle. Unfortunately libraries and bindings will take time to develop so any new-ish platform will have the same issue.
I am looking at picking up a new language. Something to add to the utility belt and not just for fun(so no lisp...). I am torn between go and rust. They seem similar yet coming from different backgrounds.
go is designed by a big company with a need for a safe systems language that is as fast as C that works well at scale with a distributed infrastructure. Rust is designed by a company with a need for a safe systems language that works well to build browsers? I like Mozilla's tech usually but go seems to have better recognition in the workplace. Any thoughts?
I absolutely adore Go, finding it to be an imperfect language that nonetheless yields powerful, maintainable solutions. It is the ultimate duct-tape language, allowing one to build robust, performant systems using a massive library and fantastic C interop where necessary. Yet I wouldn't consider it for "low-level" code. Garbage collection alone invalidates it in that regards (religious war: reference counting beats GC every time), in the same way that C# and Java aren't credible low level languages.
"Rust (the Rick & Morty of programming languages - not a compliment)"
You mean something that is good to great but that "outsiders" or late adopters feel unexplainably threatened by and thus feel the need to attack it and its admirers?
I have only dabbled in Rust a few times. It feels very unintuitive and "write-only" from my 1000 foot, ignorant perspective. But I realize that's on me, and appreciate the focus and purpose of the language.
Rust today seems like a 2013 Tesla Model S. A couple of years ago it was the GM EV1: It used to be largely promise of a future to come with a loads of downsides, where today it's expensive to get started with, has a lot of incompatibilities, but it's superior to most alternatives. Tomorrow it and those like it will be the norm.
It’s all a matter of opinion but I actually find Rust a wonderful language to write in, given the right circumstances. Which usually means “without having to deal with lifetimes”.
I tried Go, I wanted generics and errors. I like C#, but not the ecosystem that comes along with it. And so on. So for me personally, Rust is a a valid choice even when performance isn’t a first concern.
I wasn't saying someone should use Rust over Go because of Traits and other generic programming features.
I was saying if you are evaluating Rust then Go probably looks very feature light in comparison.
Same goes for programmers currently using Java/C# or even Haskell. Go is just a lot less featured than other high performance managed languages that are just as battle tested and just as fast.
This is not to say that it's not a good language or the correct tool for a job. Only that those programmers will be left wanting in many areas, generics only being one.
I've written a fair amount of Go and his view is pretty consistent with my experience. Go has a good culture of doing things the simplest correct way and only that way. Rust is really interesting because of the stronger compile-time assurances and lighter footprint (looks like it'll be a good candidate for embedding into mobile apps), I'm learning it in the hopes that I'll be able to use it as an alternative to C for portable library code.
For me the minimalism of the Go language, the quick learning curve, the great standard library, and the ease of deployment make it a great choice. I hardly ever need to code things in low level assembly, but I do need to revisit old code frequently. The explicitness of Go makes it easy to work on coded you have not touched in 6 months. I have not looked at D, and Rust is still pretty new. I may give Rust a try in the future if I can find a project for it and I have some time to learn it.
Rust is on my TODO list to dabble in; at least at a glance the language has a solid conception, a clean syntax for portability, and the language syntax appears to lean towards clarifying much of the undefined behavior optimization other languages get humans into trouble over.
I'd even take mono / C# over Java; but that's just because of the real world enterprise nightmares I've seen... all the fossilized versions of vulnerable libraries everywhere.
reply