6 ms·
The quickest comparison I'd say between choosing Rust and Go is: - if you like C or Python, you will probably prefer Go - if you like C++ with templates or D
by pdq 12y ago
The quickest comparison I'd say between choosing Rust and Go is:
- if you like C or Python, you will probably prefer Go
- if you like C++ with templates or D or Ruby (especially Rails), you will probably prefer Rust
We will see how the languages evolve, but so far I really enjoy Go having native channels, having a stable language definition, and a simple yet stable and powerful standard language API. Also the public/private access system based on capitalization is genius, and the package management is very intuitive.
- imanaccount247 12y agoThese "if you like Foo you will like Bar" claims are really silly. I've never seen one that was accurate at all, and I don't think they can be. Different people like the same things for different reasons. For example, I like C and despise go, and I despise C++ and ruby, and like rust.
- picardo 12y agoCan you elaborate on why you group Rust and Ruby together, and group Go with Python?
- panzi 12y agoI would like to know that as well. The strictness and cleanliness of Rust reminds me more of Python than of Ruby. Not to say that Go is messy or anything, Ruby on the other hand...
- woah 12y agoWhat if you like js?
- jerf 12y agoGo will be a shorter journey from JS. Rust may someday be a better complement, partially for the exact same reason that it's more distant from JS, but Go's 1.0+ today and production ready, whereas Rust is still a ways away from that, so consider your target timescales, too.
- bsaul 12y agoThen i'm afraid none will suit your taste. Go has hiddeous variable initialization ( make just for two types, and no unique syntax for initializing struct in general), and basic structure manipulation ( i still have to look the doc whenever i want to do anything with an array, or anything non trivial with a dictionary), and from what i've read rust will drive you mad with lifetime scopes.
- pcwalton 12y agoI don't see how affinity for Python on one hand or Ruby on the other would make you prefer (a) channels hardwired into the language (which neither Python, Ruby, nor Rust have); (b) a batteries-included standard library (Python and Ruby are pretty batteries included; Rust is not as much); (c) public/private based on capitalization (which neither Python, Ruby, nor Rust have); or (d) Go's package management system (Python's, Ruby's, and Rust's are fairly similar, while Go does something different).
- nostrademons 12y agoNot the OP, but I suspect he's making this categorization based on fundamental philosophical principals of the language. Python and C are "New Jersey School" languages. C++, D, and Ruby are "MIT school" languages. (For references, Google [worse is better].) The OP is saying that Go is firmly in the New Jersey School (understandable, since the developers worked at Bell Labs on C and UNIX), and I assume that Rust is in the MIT school. I haven't written enough Rust to have an informed opinion, but a quick read of the Rust tutorial makes me think the OP's assessment is correct. The fundamental difference between the two schools is in how they view corner cases. The New Jersey schools suggests punting entirely on corner cases to keep the design simple; the complexity is either offloaded to the developer, or the language designer says that the language is simply not suited for that problem domain. So you have the Go devs saying that you just don't need generics or Guido van Rossum saying you don't need execution speed. The MIT school says "We should solve the problem and make things easy for the programmer, goshdarnit", and so you get things like the STL (where every algorithm is built for maximum generality at no performance cost) or Rails's auto-pluralization of database tables. Or another way to look at it is that the New Jersey school asks "Why?", while the MIT school asks "Why not?" You can extend the analogy out to other languages: C, C++, Java, Python (borderline), Objective-C, Go, PHP, Javascript, and Perl are New Jersey school languages, while Scheme, Common Lisp, C#, Ruby, Dylan, Erlang, and Haskell are MIT school languages. Note that they very often occur in pairs (C <=> Scheme, C++ <=> Common Lisp, Java <=> C#, Python <=> Ruby, Objective-C <=> Dylan) with a similar purpose and timing in the market, but generally the New Jersey school language does better commercially. It is not universal, though - Python and Ruby are both commercially successful but in slightly different niches, as are Java and C#. Usually when the MIT-school language is successful, it's because they manage to differentiate themselves with a strong killer app or framework (eg. Rails for Ruby, .NET for C#).
- bad_user 12y agoIf you "like C", then Go is a really poor substitute, because Go doesn't allow one to juggle with memory like what people are normally doing in C. Rust is not comparable with Go, because Go relies on a non-optional GC, a difference that changes everything, Go being in the same league as the JVM, except that the JVM is better at almost everything, like garbage collectors, tools and libraries available, multiple languages etc. The JVM is even better at concurrency. Go in my opinion is the best proof that our industry is fashion driven.
- wtf_is_up 12y ago>Go in my opinion is the best proof that our industry is fashion driven. It's not though. What is fashionable about Go? Most testimonies I've seen state solid reasons for choosing it. Nobody claims it to be a marvelous language like Haskell. It's a simple language that's easy to pick up, implement an idea, and deploy. Much like python, but with much greater performance. I don't see what fashion has to do with it.
- lmm 12y agoOCaml offered the same proposition for 10+ years. No-one was interested. Oddly enough, now that Go and Rust are getting attention, people seem to also be taking a second look at OCaml. What's that, if not fashion?
- orbifold 12y agoWhile Ocaml is a really nice language it doesn't have a runtime well suited for fine grained concurrency or multi processors, at least at the moment. If you compare standard libraries, commercially backed languages have also far more of the tedious groundwork for "real world" applications done for you. Of course depending on your project this might be relevant or not.
- renox 12y agoAda & Rust show the same thing: the computer world is a fashion industry..
- 12y ago