7 ms·
Go vs. Rust: Productivity vs. Performance (2014)
- jpgvm 11y agoThis article doesn't really match my experiences. I have found Rust to be considerably more expressive than Go. Traits and proper generic types, iterators and pattern matching all contribute to this. I tend to write less lines of Rust code to accomplish the same tasks. As for runtime performance, in my experience they are pretty close right now for my use cases but I do expect Rust to grow faster than Go over time.
- snowysocial 11y agoGreat article, and I have to say I completely agree with your point on using go for enterprise level development.
- kibwen 11y agoTaking an average of wildly varying microbenchmark scores doesn't seem particularly useful. Furthermore Rust has never had particularly optimal implementations for the benchmarks game (I can't speak as to the quality of the Go implementations). Furtherfurthermore this blog post is so old that the Rust results cannot be considered representative. Furtherfurtherfurthermore I would like it if we could just all collectively stop treating the benchmarks game as though any of its microbenchmarks measure anything other than "is this language capable of binding to libpcre" or "is this language capable of binding to libgmp". I swear, the benchmarks game is the SunSpider of programming language comparisons. (Furtherfurtherfutherfurthermore, why are we still comparing Rust to Go? I thought we had gotten over this!)
- lucozade 11y agoAlthough you are of course correct, I would caution against a complete dismissal of micro benchmarks. Firstly because they are a sort of marketing: I've perused the shootout before and noticed an implementation get a higher score than I was expecting. This has sparked an interest in digging deeper into that implementation/language. Secondly because of the "can't even" problem i.e. why should I invest time investigating a new language if it can't even do simple benchmarks well? I appreciate that this isn't a particularly analytical view but I expect that it's not uncommon.
- kibwen 11y agoIt's a mistake to consider the benchmarks game a "can't even" problem, the level of effort given to each language's implementations is all over the map. This also isn't an utter dismissal of the concept of microbenchmarks, it's an utter dismissal of the concept of microbenchmarks as used to compare language implementations. Something like the TechEmpower web framework benchmarks is at least marginally better because the tasks permit a wider variation of implementations and at least pretend to do some kind of useful tasks, instead of pretending to be an arbiter of implementation quality (which, as much as the benchmarks game disclaims it, is still what people take it as).
- igouy 11y ago>>the level of effort given to each language's implementations is all over the map<< Evidently the level of effort to contribute a working Rust spectral-norm program is too high for anyone ;-) >>pretending to be an arbiter of implementation quality (which, as much as the benchmarks game disclaims it, is still what people take it as).<< The benchmarks game is "just 10 tiny examples."
- kibwen 11y ago> Evidently the level of effort to contribute a working > Rust spectral-norm program is too high for anyone ;-) Or they just don't care and refuse to let the benchmarks game hold their free time hostage. :P
- igouy 11y agoThat could be a respectable position; but not when "they" trash talk instead. That just looks bad.
- igouy 11y ago>>Taking an average of wildly varying microbenchmark scores doesn't seem particularly useful.<< Correct. Which is why, unlike Rohit Joshi, the benchmarks game simply shows a broad median; and when a summary measure is required to order the box plots, uses the geometric mean: http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.html http://benchmarksgame.alioth.debian.org/u64q/which-programs-... (Note the reminders -- "Please don't obsess over tiny differences in median values from such a small number of examples." -- "Please don't obsess about which programming language implementation is shown 10th and which is shown 11th. You can see that the order would be different if it was based on the median scores instead of the geometric mean scores.") >>as though any of its microbenchmarks measure anything other than "is this language capable of binding to libpcre" or "is this language capable of binding to libgmp"<< Incorrect. Everyone can see that there is only 1 regex task and only 1 arbitrary precision arithmetic task -- and they sensibly allow library use.
- deleted 11y ago[deleted]
- honest_joe 11y agoRust's not there yet and I wonder if it can compete. The thing is it is too specialized and low level (not that it is a bad thing for what it is intended for). The problem with all of the low-level things is that they are seriously undervalued. I am glad that there is servo but we need something like an operating system (IoT might work for the start). I hope Samsung changes its plans with Tizen and eventually will develop something with Rust in mind.
- kibwen 11y agoI wouldn't be worried about Rust competing, just because HN revolves around web tech doesn't mean the rest of the world undervalues systems programming. :)
- honest_joe 11y agoI meant financially undervalued by companies. Yes you have some players here and there but overall the market is not that big. And an investment to this area from a developer's POV is too much of a risk. Also the learning curve is too steep. Web tech is just the simplest way to reach the end user. Mobile apps or desktop apps are becoming a hassle as well. It just takes time to "install" something and use it. I hope thing change but I am skeptical.
- kibwen 11y agoI think you yourself underestimate how big the market is here. :) One of my tasks for the past few weeks has been to get in touch with companies using Rust, and whereas I expected to be talking to nothing but early-stage startups, to my surprise there are some biiiig companies out there using Rust. People in more conservative environments are only just picking it up now that 1.0 is here, expect many more announcements as to who is using Rust to emerge in the next 6 - 12 months.
- alimbada 11y agoCan you give more detail? Which companies and/or where are they based?
- anhtran 11y agoI think Rust is a fledgling this time. But I love the clearly orientation that they focus on. It is a safety system language, especially, the ownership/borrowing.
- pjmlp 11y ago> Go seems to be for the Python, Ruby and Java developers and will be used for enterprise applications, mobile apps and application servers. No thanks, Go offers no benefit over the Java eco-system, neither in terms of deployment[0][1][2], not in terms of libraries and dependency management, nor in language expressiveness (Java 8, Scala, Clojure, Kotlin, Ceylon, Groovy) [0] http://www.excelsiorjet.com/ http://www.excelsiorjet.com/ [1] http://robovm.com/ http://robovm.com/ [2] http://www-01.ibm.com/support/knowledgecenter/api/content/SSYKE2_6.0.0/com.ibm.java.doc.60_26/vm626/GenericWrapper/commandlineoptions_jit.html?locale=en http://www-01.ibm.com/support/knowledgecenter/api/content/SS... EDIT: Also forgot to add that we enterprise devs also have C#, F#, Swift, C++14, C++/CX at our disposal
- deleted 11y ago[deleted]
- copx 11y ago[0] Price per developer (!) $3000, only supports Java 7. To compare, the price of the Go compiler per developer: $0 I see one clear benefit right there.
- pjmlp 11y agoI just wanted to list a few examples. Almost all commercial JVMs do support AOT compilation. Plus we are talking about the enterprise here, those values are peanuts in project budgets. Also don't forget to add "developer time * cost per hour" writing repetitive code in Go to your price.
- dleskov 11y agoLow/zero cost is a benefit only if everything else is equal. Eclipse and Netbeans are free, yet people pay for IntelliJ IDEA. We use an expensive commercial GUI testing product because all the free and cheaper alternatives sucked big time, and support was either poor or non-existent.
- dleskov 11y ago[0] can be had at $10+ under a charity program at the moment: http://www.excelsiorjet.com/charity http://www.excelsiorjet.com/charity
- ExpiredLink 11y ago> I think Rust will attract developers from C, C++, Fortran and will be used for developing high performance systems like gaming, browsers, telco servers, distributed computing systems as well as low level, cpu efficient embedded/micro computers. People choose platforms, stacks, languages, environments, not languages: Rails not Ruby, browser not JavaScript, Unix not C, host not Cobol, ...
- unfamiliar 11y agoFortran programmers will never move to Rust. The level of systems knowledge required to use Fortran is almost nothing. It is already a pretty safe language due to the heavy restrictions on pointers and compiler warnings. The abstractions and restrictions in Rust will make it completely unpalatable to the scientific community.
- pjmlp 11y agoIf anything they might eventually adopt Chapel, specially it is has the sponsoring of a few CPU vendors. Also Fortran is getting a new standard revision this year.
- kibwen 11y agoI'm not sure that Rust particularly cares about attracting Fortran programmers. Fortran is a highly specialized language whose most powerful asset is its enormous body of working code. That's not a market that needs another competitor.
- kele 11y agoThe article has a major flaw: it confuses productivity with LoC.
- nickysielicki 11y agothey don't exist in the same space. Go is not a systems programming language and Rust is not a scripting language.
- alediaferia 11y agoDespite being always interested in seeing benchmarks comparing new languages I don't feel like basing my choices on such benchmarks. From my experience it's usually a matter of how comprehensive is the ecosystem surrounding the language. Anyway, great article.
- collyw 11y ago"Go seems to be for the Python, Ruby and Java developers and will be used for enterprise applications, mobile apps and application servers." Out of interest, what would I gain by learning GO? I already know Python pretty well. I have done Java in the past and don't see any problem jumping back into it. Both languages have tons of libraries and tooling available. Are mature, and I can't see much reason to opt for a new language.
- falcolas 11y ago> what would I gain by learning GO? I already know Python pretty well. A significantly easier deploy story. Compile once on your target platform (i.e. Ubuntu), run on any of the same platform, without having to worry about installing (or how to install) all of your third party dependencies. It's also more friendly to less skilled developers, with its type system and limited metaprogramming. It also has a really compelling concurrent programming paradigm which doesn't involve libraries or pickle. Of course, those same strengths are also weaknesses - the language is less expressive and flexible, and it requires extra steps to compile and distribute those compiled binaries.
- flippinburgers 11y agoGo is a simpler language and as such it is a better language.
- EugeneOZ 11y agoThen BASIC is most awesome language.
- flippinburgers 11y agoAlways use the simplest solution that solves the problem. I didn't realize that BASIC has concurrency. /s
- the_why_of_y 11y agoYou wouldn't believe that there's a "Concurrent Basic" research project that's putting a variant of the 𝛑-calculus into BASIC. Erik Meijer truly has some strange ideas... http://research.microsoft.com/en-us/projects/concurrentbasic/default.aspx http://research.microsoft.com/en-us/projects/concurrentbasic...