TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Would you consider replacing Ruby with Rust instead of Go?

12 点作者 davidpelaez超过 9 年前
I'd love to see comments that don't consider the amount of libraries but the languages themselves since eventually more open source will exist in Rust. This is mostly a question of someone doubting go because of this http://yager.io/programming/go.html

5 条评论

deckiedan超过 9 年前
Rust and Go are very different languages, with very different aims and objectives. They are often mentioned together, as a few years ago around about the time Go went public, they both talked of themselves as &#x27;Systems Languages&#x27;. But they meant very different things by that.<p>Ruby is not a language that would ever be used for writing a web browser, Virtualmachine, OS kernel, or other high performance low-level software.<p>Nor is Go.<p>Rust is.<p>Ruby and Go are languages for writing servers, web apps, &#x27;scripting&#x27;, and high level stuff.<p>Rust has the interesting property that it may well be possible to write relatively sane higher-up-the-stack server software, in the land that Ruby and Go currently are popular, but it&#x27;s not there yet.<p>If you want a replacement for Ruby, and don&#x27;t want to use Go (for whatever reason), then I&#x27;d really advise asking &quot;Why?&quot;, first.<p>If you want to learn and grow as a programmer, then learn a bunch of languages, and don&#x27;t get too hung up on whether or nor they&#x27;ll last. There&#x27;s a good chance that in 20 years time we&#x27;ll all be using something totally weird and different, so learning a bunch of different ways of working and learning to think in different terms from Ruby may be more use than any specific language. Learn Haskell, Rust, Racket, Erlang, Assembly, Forth, Ada, Fortran, C, D, Clojure and Scala, say.<p>If you want a very practical language for writing server stuff, quickly and without having to learn too much new stuff straight away, then maybe look at Elixir, Kotlin or Ceylon.<p>If you&#x27;re happy with Ruby, then there&#x27;s no real reason not to stick with it. It&#x27;s a good language, and a lot of fun to use. (Elixir is superficially similar, if the aesthetic of Ruby code really appeals to you).<p>Rust should be pretty easy to write extensions for ruby in, so if you want to try branching out into Rust, for doing high performance &#x2F; low-level stuff, then give that a go.
评论 #10578276 未加载
评论 #10608284 未加载
derekperkins超过 9 年前
While the points in that article are valid, in practice they don&#x27;t cause as much trouble as Go trolls think. :)<p>As for moving from Ruby to Rust or Go, Go is almost guaranteed to be faster for developers to learn. The reason for the complaints in the article is that Go is intentionally simple, and you&#x27;re seeing many people migrating from dynamic languages to Go for those benefits. The fact that Go has its roots in C will make it immediately understandable to anyone with experience in a C-type language.<p>My final thought is going to address libraries and widespread acceptance. Regardless of your thoughts about Go as a language, there is no doubt it is here to stay. Underlying major technologies like Docker, it has already seen massive adoption. While initial signs are positive for Rust, you&#x27;re still betting that it continues to build momentum and doesn&#x27;t stagnate like Haskell.
评论 #10608298 未加载
TheSwordsman超过 9 年前
&gt; I&#x27;d love to see comments that don&#x27;t consider the amount of libraries but the languages themselves since eventually more open source will exist in Rust.<p>That doesn&#x27;t seem like the kind of comment to start a meaningful conversation. I must ask, what data do you have behind that statement.<p>I think both languages offer their own set of pros and cons.<p>For me, Go has been my go-to because of the maturity of the language. And, it has been implemented in systems that run at a very large scale by people within Google&#x2F;YouTube as well as CloudFlare.<p>Would I consider it? Honestly, maybe one day. But that depends on how the language, and related things, mature over the next few years. And I think it&#x27;s after the libraries have filled-in, and there is experience running systems built with it at scale.<p>Go is allowing me to solve the problems I have right now with some well-built packages. Is it perfect for everything, no. But it does well in a lot of areas.
评论 #10608230 未加载
akacase超过 9 年前
No, Go is more simple, in terms of syntax among other things. The threading model in Go is very attractive as well, please refer to this article: <a href="https:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;thread&#x2F;" rel="nofollow">https:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;thread&#x2F;</a>
评论 #10578358 未加载
评论 #10608655 未加载
hartator超过 9 年前
IMHO, Ruby is still one of tthe strongest language in term of ease of use, object orienteness and features. Go and Rust compared to Ruby will adress not performance but core scability and this can be addressed in numerous ways in every architecture.
评论 #10608200 未加载