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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Rust can be difficult to learn and frustrating, but it's also very exciting

287 点作者 pauldix超过 6 年前

19 条评论

ilovecaching超过 6 年前
Rust is the answer to the question &quot;can we have speed, correctness, and expressiveness in one language?&quot; My company has been running Rust in production for awhile now, and it&#x27;s exceeded every expectation. It&#x27;s fast, it&#x27;s safe, and it&#x27;s so productive it&#x27;s hard to find a reason to use anything else.<p>We&#x27;ve also found that the learning curve is, in our opinion, a bit overstated. We&#x27;ve ramped up several new grads on Rust with the O&#x27;Reilly Rust book. We see real productivity in about two weeks, which is actually faster than it was to ramp them up on our C++ code base. The compiler errors are <i>amazing</i> and it&#x27;s almost like giving them a built in tutor.<p>I&#x27;m very bullish on Rust becoming <i>the</i> language of choice in the 2020s for everything from operating systems, web services, desktop applications, and more. It&#x27;s that good.
评论 #18280387 未加载
评论 #18280315 未加载
评论 #18280494 未加载
评论 #18279982 未加载
评论 #18280591 未加载
评论 #18280225 未加载
评论 #18279770 未加载
评论 #18283692 未加载
评论 #18282008 未加载
评论 #18280550 未加载
nevi-me超过 6 年前
I&#x27;ve enjoyed learning Rust, but I&#x27;m at the stage where I&#x27;m hitting constant stumbling blocks because of the slightly niche nature of what I&#x27;m doing.<p>It&#x27;s the ugly side of Rust; when you&#x27;re stuck with a series of problems that you can&#x27;t solve (or take too long to solve), when there aren&#x27;t enough people in the community to help you, and you end up being unproductive for a while.<p>Where I&#x27;ve seen small projects to their completion, Rust has been greatly rewarding to me. It&#x27;s the projects that are bigger and more ambitious where I&#x27;m struggling.<p>&gt; After reading the first 10 chapters of Programming Rust, I was able to push through the rest of the implementation. I still have open questions, and I’m not sure if the structure I used makes the most sense.<p>There&#x27;s some chapters of TRPL and other resources that I&#x27;ve re-read a few times by now. Learning the language ends up being quite a lot of an academic exercise, but the benefit&#x27;s that once a concept clicks, it paves way for many other concepts.<p>My only advice to less experienced programmers (whom you&#x27;re not) learning Rust: Stay away from writing or rewriting time-critical applications in Rust if you can&#x27;t tolerate being stuck on a problem or series thereof for weeks.
评论 #18280526 未加载
评论 #18278529 未加载
评论 #18278522 未加载
评论 #18279389 未加载
ammaskartik超过 6 年前
I have been learning Rust on and off this year. I have been writing mostly GO for the past few years, but am moving to coding almost primarily in Rust for any new project, and porting over some older ones. Microservices, Data Layer, etc... Honestly, while not perfect, its one of the most beautiful languages I have ever come across. Plus, I have not enjoyed coding in a language this much in a while.
评论 #18279709 未加载
EduardoBautista超过 6 年前
Rust is one of those languages that I just can&#x27;t see myself ever working with (I mostly do web dev), but it&#x27;s a language I am really glad I learned and has made me a better overall developer.
评论 #18278165 未加载
评论 #18277985 未加载
评论 #18277939 未加载
评论 #18278907 未加载
joobus超过 6 年前
I&#x27;m optimistic for the future of Rust. I currently program in Go for server side web stuff, but with the proposed changes to the Go language, the decision to choose Go over Rust becomes less compelling; Rust already has generics, a competent module system, better error handling, and ADTs. Go had a very narrow scope and very clear oversights, which are now bigger issues they are trying to shoehorn solutions into with the go v2 proposal.<p>I&#x27;ve been following rust for a while and have known it is not web ready, but early next year I think will be a different story.
评论 #18285662 未加载
评论 #18280013 未加载
评论 #18281317 未加载
erwan超过 6 年前
I love Rust, but in all honesty I wouldn&#x27;t use it vs. Golang or C++17 for something that isn&#x27;t a critical system (e.g a cryptography lib) and even then I&#x27;m not sure I wouldn&#x27;t use something like OCaml instead.<p>The curve to productivity seem way too steep for the payoff.
评论 #18280218 未加载
js2超过 6 年前
I think folks might find Sentry’s use of Rust interesting. Sentry is quite invested in Python on their backend, but needed additional performance mostly related to symbolication of crash reports. So they have a Rust symbolication library with Python bindings giving them the best of both worlds for their app.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;getsentry&#x2F;symbolic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;getsentry&#x2F;symbolic</a>
tsomctl超过 6 年前
Can anyone recommend exercises for learning a new language. For example, something like &quot;implement a class with these methods&quot;, or implement a function that does this. Something that is realistic, should only take an hour or two to implement for a competent programmer, requires you to learn more complicated features of a language, yet I can finish before getting bored or frustrated?
评论 #18278009 未加载
评论 #18278920 未加载
评论 #18278094 未加载
评论 #18277992 未加载
评论 #18278273 未加载
评论 #18280051 未加载
评论 #18278105 未加载
评论 #18278562 未加载
评论 #18279475 未加载
评论 #18279305 未加载
asdfman123超过 6 年前
Question: does &quot;getting rusty&quot; mean you&#x27;re getting better or worse at Rust?
评论 #18278917 未加载
评论 #18279384 未加载
qaq超过 6 年前
Learning Rust at the moment and Pony looks really interesting too. I think at this point in time it&#x27;s safe to say Rust is here to stay so the investment of time into learning it is well worth it as it will stay around for a long time.
13415超过 6 年前
I&#x27;ve learned a bit of Rust recently but then started programming in Go. Now that I&#x27;ve learned a decent amount of Go I&#x27;m thinking of giving Rust another try, because Go has so many obvious weaknesses.<p>However, I&#x27;m still torn between those languages, which I both consider as fancy alternatives to C++ with a growing amount of libraries and community support. I neither like Go nor Rust, but learn them to keep up to date and because I need something with good tooling and many libraries that creates compact and fast executables. Rust still seems overly complicated to me, though, and I say that as someone who enjoys programming in Ada.
评论 #18285625 未加载
vmchale超过 6 年前
I don&#x27;t actually think Rust has that many stumbling blocks compared to other programming languages. It&#x27;s a pain in the ass compared to Haskell but not e.g. Java.
kieckerjan超过 6 年前
Rust&#x27;s main attraction for me (coming from a C background) is that it allows you to do threading reasonably confident that you will not enter a world of pain after a simple mistake. In an ever more concurrent world that is a major plus.
snrji超过 6 年前
I enjoy coding in Rust, and I think it&#x27;s a step in the right direction, but I&#x27;m still looking for a general purpose programming language which model IO&#x2F;State effects the same way languages supporting functional programming do with pure functions. Haskell monads are not granular enough. The closer thing I&#x27;ve seen is Purescript, but still is not general purpose enough. Solidity&#x27;s &quot;pure&quot; annotations are a step in the right direction, but I&#x27;m speaking about something much expressive. Also, it should have a Rust&#x2F;C-like syntax in order to be able to be mainstream, but I&#x27;m happy with Haskell-like syntaxes.
评论 #18284277 未加载
atoav超过 6 年前
I didn’t really find Rust especially hard to learn. I came from Python with a very beginner level experience in embedded C.<p>The hardest part is probably to stop yourself from trying to applying solutions you learned in other languages into Rust. I caught myself multiple times trying to put things into python style classes, which failed horrible each time. The moment you grasp how to do things the rust way you will end up with solutions that are most likely more elegant, safe and fast than the thing that you tried to do first.<p>Over time (a few weeks) I managed to get a good enough intuition on Rusts concepts of ownership to not having to constantly think about it.
ram_rar超过 6 年前
Rust has definitely made me a better systems engineer overall. But, its not a language I can use for web dev. I hope, it gets easier to integrate rust into python in future.
评论 #18278996 未加载
评论 #18279803 未加载
sidcool超过 6 年前
How does it compare to Go? Concurrency and safety seem to be the forte of Go lang too.
misrab超过 6 年前
Try writing a linked list in Rust...or implementing a graph. It&#x27;s not intuitive I think?
throwaway487548超过 6 年前
It seems that the main problem with Rust is that it has been grown up <i>not</i> from the CS and PL theory <i>fundamentals</i>, like ML, or Scheme or Erlang or even Go, and it is obviously not a small, clean language everyone loves and appreciates as being beautiful. In other words it is just little better than C++, which is a crap.<p>If a language could be grown from ML (Ocaml) roots (like Scala) instead of C++, it could be <i>much</i> smaller, cleaner and more pleasant to work with. Rust&#x27;s only innovation is in the compiler tech, which could be ported and <i>simplified</i> (due to more predictable semantics of a functional language) to any ML-family language.<p>I cannot overemphasize how beautiful the pattern-matching with local bindings on algebraic data-types is, and what a wonderful thing is Erlang&#x27;s pattern-matching on receive, and how, say, protobuf is basically product&#x2F;record-types annotations, which could be done in a ML-family language itself etc.<p>Rust is under the curse of C++ (a statically typed and standardized dialect of PHP3) if you wish. It is obviously good language compared to C++, but somehow Ruby-ish, compared to ML-family languages.<p>It is actually a pity that Rust and not ML&#x2F;Ocaml are considered cool and sexy by modern teenagers (like it used to be with Ruby and with Rails not so long ago). ML is much better starting point than C++. Perhaps, polished to perfection languages (Scheme, Haskell) are less appealing for the crowd being too dry, without ambivalence.<p>BTW, the next cool language definitely should be something like typed Erlang with Ocaml&#x27;s syntax ;) - a hybrid into which typed Python or Typescript are growing into.
评论 #18282132 未加载
评论 #18281387 未加载
评论 #18281918 未加载