Choosing Between Rust or Go?
dmv.myhatchpad.com
dmv.myhatchpad.com
And they're on the first page of google!
https://www.2020lexus.com/car-reviews-2019-2020/
First paragraph:
"Honda Civic is actually 1 of the most recent car that are designed by Honda. This car is a sedan car hybrid of which are developed to be used for metropolis car used."
To me the question in the title is as ill posed as would be "Choosing Between C or JavaScript?".
And let me explain. This guy has been "at a startup" and "at a Golang Meetup." If that isn't thought leadership, I don't know what is.
Good point.
It's a very light article, written for people who listen to Thot Leaders. It misses most of the important points.
Go is designed for web back ends. It has all the stuff you need for that, and the libraries have been thoroughly pounded on and debugged, because Google uses them internally. The language is stable and doesn't change much. It's a good fit to that job.
For other applications, Go may or may not be a good fit. Desktop apps? Probably not. Games? Probably not. Real-time control? No.
Rust now seems to be trying to use every cool idea around, all at once. The borrow checker was brilliant. The added cruft, not so much. We have generics! We have type theory! We have lambdas! We have functional programming! We have threads! We have futures! We have async! We have a whole bunch of different HTTP libraries! We've changed the error handling system how many times now? It's all very cleverly done. But it's overdone. I'm out of that world, and not clear on whether there are signs of it settling down yet.
That's a completely different industry, I think.
> The added cruft, not so much. We have generics! We have type theory! We have lambdas! We have functional programming! We have threads! We have futures! We have async!
Generics, lambdas, and threads are must-have basics. Futures and async are the same thing. Rust doesn't "have functional programming", unless you mean chaining `map` and `collect` methods, in which case Java also has functional programming.
HTTP and error handling are third-party libraries. Multiple choices in this area are a direct result of not trying to bundle the kitchen sink with the language. These things don't standardize in a year.
This is a process problem. The development process for Rust does not seem to force convergence.
[1] https://hackernoon.com/programming-in-rust-the-good-the-bad-...
Among the Rust ecosystem things to gripe about, this is a odd one.
async_std vs. tokio is the real split-investment battleground these days, effectively undermining the async/await momentum right as it gets out of the gate.
- heavy Go marketing, which (intendedly or not) makes devs think that Go is "great at everything": you can't tweak memory management? that's a feature¹.
- simplified/misguided categorization into old language models: Golang is the new C, Rust is the new C++.
I think with a long enough time, the roles of the two languages will become significantly clearer.
¹: to clarify, that's a feature in some contexts, but not in others (therefore, not appropriate for "everything").
I also expect this to be the case. But when I try to think of historical context, I come up blank. Was there this much polarization between languages in the past? I remember similar rumblings between Java and C# like 15-20 years ago, but that had more to do with the corporate backing and licensing IIRC. This feels more like political/tribal arguing.
Just for clarification, neither are supported according to the linked document. (the double negative was confusing for me)
It's for anywhere you want an iron grip on memory and correctness and the cost of screwing up is very large and don't need a quick minimum viable product. You'd expect to be writing a database or a high availability proxying server or any kind of driver or a game engine
- Rob Pike
https://web.stanford.edu/class/ee380/Abstracts/100428-pike-s...
edit: To provide greater context from the slides I linked. Go was designed to replace C++ and Java in Google.
Was it successful in this task?
Far from it. golang, both the language and the ecosystem offer nothing close to what Java (and the JVM) offer in terms of building reliable systems, monitoring, profiling, performance, etc. Sorry to say, the fact that this comparison was made in the first place shows lack of experience.
* Go is an extremely productive language * It doesn't have all the fancy cool features other languages have * The community is huge and it is easy to find libraries * It has gained popularity faster than any other language I can think of. They must have done something right.
I am not sure why would you want to run your IDE in a web browser, but Visual Studio Code [1] is regarded by the Go community as one of the best code editors (with plugins) [2] to develop Go projects, and in case you do not know already, Visual Studio Code is technically a web browser [3]. That being said, Goland [4] is probably one of the best integrated development environments for Go programming out there.
[1] https://code.visualstudio.com/
[2] https://code.visualstudio.com/docs/languages/go
let the downvotes begin :)
Actually, with Rust you can even link with msvc toolchain, which Go cannot.
1. largely avoiding huge tightly-coupled frameworks like Django
2. writing a little more boilerplate with the payoff of making code a lot clearer to reason about without having to step through tons of layers of overly-dynamic libraries
I think Go will really start to eat up the backend web services space in the coming years.
scotty (-> net/http), aeson (-> encoding/json), and postgresql-simple (-> database/sql) are pretty close, although aeson & postgresql-simple need some tooling on top to get them on par w/Go struct tag reflection imo.
I still love to use more advanced Haskell libraries, but there's something to be said for stitching together functions in IO with simple types.
That's absolutely NOT true of Haskell. It's a much more nuanced language and while I'm sure it's great once you learn it, the learning curve is steep. Because of that I think it's much easier to hire Go developers than Haskell developers too
There are economics at play here too. If your turnover rate is high (1-2 years even), the company can get the short end of the stick, while the employees get to pay the fixed cost of learning Haskell on company time.
My experience though is FP novices can get to doing new-hire-level tasks in Haskell within a couple weeks of mentorship. I've seen 0-FP-experience interns dive into applicative functor code in _Scala_ and have no trouble so long as we sat down and explained things from first principles (and motivated the value of the abstractions we use.)
I have actually found the opposite to be true for hiring. Every place I've worked has had more Haskell applicants than they knew what to do with. Largely because Haskell can make your company uniquely desirable in a sea of options.
The only time a Haskell company I worked at "had trouble hiring" was when we turned away countless Haskell-experienced developers due to the sole veto of a VPE over and over again. After months of observation, it was clear that he was actually starving the team of Haskell resources so he could build momentum to move away from it (despite the team being fine with the language)
Not just Haskell, but any mature OO language/runtime as well (JVM, .NET). The fact remains that golang is popular because of Google's name behind it. While its concurrency model is somewhat decent, its warts get in the way very quickly for any non-trivial project.
I think Java/C# are verbose and ineffectual languages and people are seeking alternatives that make a lot more sense and deliver more power and speed.
* ResourceT is composable defer
* Streaming libraries (I use conduit due to familiarity) mean I don't have to write wonky loops to process data in constant memory
* ExceptT & Either is more composable error handling
* Parametric Polymorphism all around, but especially when it comes to concurrency (no need to hand-roll goroutine rube goldberg machines!) and collections (same but for hand-rolled loops)
* Async exceptions mean you can't have runaway threads without added implementation burden (I'm looking at you select + Context!)
* Sum types for a variety of use-cases :)
I've been using Rust as "fast Python". It's super expressive and you can get things done quick and dirty if you want.
IMO, the one advantage Go has over Rust is the fast compile time. Rust's type system makes it worth the wait (which isn't even really that bad).