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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: What's the Deal with HN and Rust?

45 点作者 hcabral大约 3 年前
Just curious, I see so much "pumping" around Rust, and as an engineer myself, I beg the question: why the hype here specifically?

27 条评论

skocznymroczny大约 3 年前
As someone who looks at Rust and other alternative languages every now and then. I think many C&#x2F;C++ programmers are looking for an alternative. C&#x2F;C++ accumulated a lot of legacy stuff over the years, and things like #includes, .h vs .cpp, non-trivial metaprogramming, limited IDE capabilities, no standarized package manager show how old these languages are.<p>Compare it to Rust, which has one build tool&#x2F;package manager. No more hunting down dependencies, arguing make vs cmake vs 20 other tools. 99% of projects just use cargo and building a project on every platform is just one cargo build run away. Compiler is smart and can show you many errors in your code that C++ never could. Old mechanisms like header files are replaced with a modern module mechanism. Also some interesting features like the traits system.<p>All that with performance close to C&#x2F;C++ and with increased safety. Also, there is a lot of hype behind the language making it reach critical mass. It&#x27;s not surprising to see many people flock to it. Some people dumped C&#x2F;C++ in the past for Java&#x2F;C#, but these languages don&#x27;t support the same usecases as C&#x2F;C++ do. Rust does.<p>Personally I dumped C&#x2F;C++ for D years ago and don&#x27;t regret it. It&#x27;s not as popular as Rust is, and doesn&#x27;t have the same ecosystem or big companies behind it, but it works for my needs. If Rust existed at the time I was looking for an alternative, I&#x27;d probably be using Rust now.
评论 #30686361 未加载
lumost大约 3 年前
Rust is really appealing for applications with native code. C&#x2F;C++ is still responsible for somewhere between 20 and 50% of software depending on who you ask and how you count. These languages have a ton of legacy to deal with and persistent tedious memory leaks which introduce security issues etc.<p>Rust doesn&#x27;t have these issues owing to the &quot;newness&quot; of the language and the memory model. If you&#x27;re are a C or C++ dev then this is very exciting. If you are an engineer who was always turned off of native coding due to C&#x2F;C++, then this is very exciting. If you just like languages, then this is pretty exciting to.
评论 #30685735 未加载
mamcx大约 3 年前
HN is about interesting stuff.<p>Rust is VERY interesting: Novel memory management, low-level, great tooling, can ACTUALLY compete against C&#x2F;C++ across the board, have a lot of modern stuff: ML heritage, functional idioms (but you can do imperative code, not worry!), const&#x2F;immutability promoted, NOT NULL thank you very much!, UTF-8 string &quot;oh amazing&quot;, a lot of edge cases accounted for...<p>And, with interesting tools you get people, interested, in build things. And things that before, you can&#x27;t do without get the complain &quot;but C&quot;.<p>Now, there is NOT excuse to get into the bandwagon of Fast, Safe, yet ergonomic.<p>--<p>And when something like this happens, it invigorate the &quot;market&quot; and other will try taking advantage of what this do good and what it not much (so, I see zig, Nim, odin, catapulted because Rust&#x2F;Go&#x2F;Elixir make people talk about programming languages)
评论 #30691399 未加载
rocgf大约 3 年前
Rust fixes some issues that haven been present in most mainstream languages for decades, while maintaining performance.<p>There are many such languages or tools - Haskell (or other FP languages) or Erlang being among them - that have some vocal minorities that actually use them. The reality is that these language are highly unlikely to ever gain the traction they might arguable deserve.
评论 #30685254 未加载
softwaredoug大约 3 年前
Why do you think it&#x27;s just Hacker News?<p>I noticed on Manning (<a href="http:&#x2F;&#x2F;manning.com" rel="nofollow">http:&#x2F;&#x2F;manning.com</a>) &quot;Rust in Action&quot; was the top-selling book for over a month. I think Rust is just a hot topic right now.
评论 #30686590 未加载
rendall大约 3 年前
You&#x27;re not wrong.<p>HN Rust articles: 4 in the last 24 hours (not including this one)<p><a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=false&amp;query=Rust&amp;sort=byDate&amp;type=story" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=false&amp;qu...</a><p>HN Go articles: 0 in the last 24 hours <a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=1&amp;prefix=true&amp;query=Go%20&amp;sort=byDate&amp;type=story" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=1&amp;prefix=true&amp;que...</a><p>JavaScript: 5 in the last 24 hours - a much more popular language but none of these got to the front page<p><a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=true&amp;query=Javascript%20&amp;sort=byDate&amp;type=story" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=true&amp;que...</a><p>Counting comments per article the difference is even more dramatic
评论 #30685559 未加载
评论 #30693407 未加载
Joeboy大约 3 年前
Maybe to some extent it&#x27;s a similar situation to git. Everybody knew CVS and SVN kinda sucked, there were lots of competitors, but they all remained esoteric until git, which a) had immediate &quot;mainstream&quot; adoption due to the linux kernel and b) was really good. Rust got early adoption due to Mozilla and.. is also really good.
beepbooptheory大约 3 年前
It solves a lot problems, but mainly it solves problems in a kind of idiomatic way that makes it feel like a big paradigm shift, which contributes to genuine enthusiasm. This combined with the massive funding and community around it helps it feel like something you can give yourself to a be supported.<p>Whether its the best solution or &quot;deserves&quot; its hype is not a real fruitful question you can ask, as there are many things you need a computer to do, and some of them aren&#x27;t systems programming. Some things benefit from different kinds of ergonomics, thats ok.<p>Is there a language that is <i>more</i> funded out there right now?
dec0dedab0de大约 3 年前
There is a loud group of developers that want to get rid of C, because of it&#x27;s lack of memory safety, and all the security issues that come with that. Also, there is still love for Mozilla, despite some of their annoying behavior lately.<p>I don&#x27;t think Rust is being promoted more than any other language people feel passionate about, but these things tend to go in clusters, so it may seem that way. I think if something specific to a language makes it to the front page, the discussion leads people into looking up things about that language, which then makes them discover, or remember something they think is worth sharing and repeat. The last few weeks I&#x27;ve noticed more Ruby than usual, I see clusters of Python and Go very often, and every year or so there are a few lisp stories in a row. Sometimes this also coincides with conferences.<p>You don&#x27;t generally see stuff advocating for bigger languages because they don&#x27;t need advocates. Instead you might see particular libraries or techniques. I suspect the hype around Rust specifically is people that really like rust hoping that it catches on before it dies out like so many other technologies.
gostsamo大约 3 年前
It solves a large class of problems that are not handled in C and C++. Some people are hyped that it can solve all problems under the son, while others don&#x27;t like the hype talk or are deeply invested in C and C++ knowledge and don&#x27;t like their belittlement.
评论 #30684496 未加载
评论 #30685020 未加载
评论 #30685458 未加载
stephc_int13大约 3 年前
Rust might be a better C++. (Zig is the better C)<p>The memory safety thing seems to be appealing to some people who believe it will dramatically reduce the security issues found in many software. (they usually know very little about actual security exploits)<p>Rust is building a cult-like community around it, and I think it could be its demise, I personally hate it (the community)
评论 #30685647 未加载
badrabbit大约 3 年前
I haven&#x27;t seen much pumping for Rust. It is a great language but I see Go and even Ada and Ocaml are mentioned a lot (relative to actual adaption) here. There are lots more esoteric languages getting hyped on HN. There was even a popular post about .NET the other day.
评论 #30686897 未加载
评论 #30685341 未加载
ohCh6zos大约 3 年前
I might be part of the cult, so take this with a grain of salt. Rust is the first time a language had actually been exciting to me since the 2000’s.
nivenkos大约 3 年前
It&#x27;s pretty good and practical.<p>The only real downsides are in the library availability and deployment vs. more established languages.<p>I&#x27;d choose to use it if I could though, it has the least downsides of any language IMO.
评论 #30685517 未加载
评论 #30685401 未加载
iExploder大约 3 年前
inexperienced novices and disheartened veterans alike get infatuated with that new shiny thing ...<p>the rest of just smirk at the pump articles, as we have achieved state of Zen and realize _all_code_is_garbage_ and that nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care about code let alone a programing language the app was written in
评论 #30684774 未加载
评论 #30685370 未加载
评论 #30685575 未加载
评论 #30685261 未加载
otikik大约 3 年前
I do think the language offers some genuine advantages and strikes a difficult balance between features, practicality and speed.<p>I think it has some problems as well (the learning curve is still steep, and I don&#x27;t know if that&#x27;s solvable).<p>However I think the reason Rust gets attention here is because it is heavily used in crypto, which is regularly pumped in HN as well as in other places.<p>(<i>ducks</i>)
评论 #30686230 未加载
rr808大约 3 年前
I&#x27;d love a Rust job but there are even fewer around than golang and much less than C++. Any suggestions for a newbie?
评论 #30685724 未加载
评论 #30697423 未加载
dang大约 3 年前
It&#x27;s just at the peak of the hype cycle. Other languages&#x2F;technologies have gone through this in their day - Node.js and Go come to mind. Eventually it settles. No doubt the advent of some new hotness would catalyze the process.
评论 #30687837 未加载
评论 #30688551 未加载
PaulHoule大约 3 年前
Well, many people don’t want to pay the factor of 2 performance cost of a managed language like Java and strcpy in C is Turing complete and most code has to portable to at least x86 and ARM (often both 32 and 64 bits) so assembly is out…
评论 #30685577 未加载
评论 #30686187 未加载
armchairhacker大约 3 年前
IMO C++ was and is still the leading language for writing performance-intensive and memory-intensive applications (excluding Rust), and C++ is <i>really</i> flawed. Like, I know that Java and JavaScript and Python get criticism, but the fact is those languages are still usable compared to C++:<p>- There are several different ways to do everything and half of them are wrong. For example, you can define an unsigned int type with &quot;unsigned&quot;, &quot;unsigned int&quot;, &quot;uint32&quot;, &quot;uint32_t&quot;, &quot;unsigned long&quot;. Why are there 5 different types for unsigned integer? C++ also supports C-style arrays and pointers and casting, but most of the time you end up using std::shared_ptr and std::vector or std:array or static_cast or dynamic_cast instead.<p>- Speaking of which, C++ is even more verbose than Java. Most classes will require 2 files, the .h and .cpp, and it&#x27;s not exactly clear which code belongs in which.<p>- The C++ compiler and parser is probably the most complicated compiler that ever existed. There is seriously no other language as complicated as C++.<p>- C++ errors are very long, very verbose, and it&#x27;s hard to even find where the error is. I literally had projects where I had a simple error (e.g. calling a standard library function with the wrong arguments), and I spent time trying to debug it because I couldn&#x27;t even find the error location since the error messages were so long they went past the terminal buffer limit.<p>- CMake is really bad. I can&#x27;t speak much to how bad it is because I don&#x27;t even really know how to use it despite working on multiple C++ projects. But I do know, trying to clone C++ projects with CMake they often fail, and that out of all the build systems I&#x27;ve worked with (including npm, Maven and Gradle), CMake is the one I still don&#x27;t really understand.<p>- The C compiler is also really slow. Static analysis is also not very good, even with the effort put towards it, because C++ is so complicated.<p>- There is no easy way to declare a tagged union (excluding third-party libraries). There are also a few other features that Rust does which take a lot of boilerplate to implement in C++.<p>- And on top of that, you have buffer overflows triggering security vulnerabilities.<p>In conclusion, C++ is basically broken, which is why so much time and effort has been put into Rust. In fact, a lot of Rust design decisions (good error messages, simple package manager, tagged unions, the entire borrow checker) were put in precisely because of how badly they were handled in C++. Rust definitely has its own flaws, and is a lot newer and more unstable. But it&#x27;s the best alternative that allows programmers to write performant and scalable applications which is not C++.
评论 #30701988 未加载
super_flanker大约 3 年前
My 2cents, I&#x27;m a software engineer and have been in industry for long time(~20 years). A new programming language doesn&#x27;t excite me anymore as it used to do 5-10 years ago, then I encountered Rust and I really liked it. All my personal projects, small utilities are written in rust. I specifically look for Rust related HN posts. I think there are many people like me who appreciate rust as a programming language and they make such posts.
cp9大约 3 年前
people like it?
pvtmert大约 3 年前
I&#x27;d say rust is the *only* true open-source modern compiled language that can replace C&#x2F;C++<p>Go: Too much Google influence and GC&#x2F;allocation being constrained by it&#x27;s authors. Swift: Same for Apple, see above Nim&#x2F;Zig&#x2F;Crystal&#x2F;Elixir: Too behind in terms of widespread support and development. (At least not as good as rust)
bArray大约 3 年前
I know that Rust seems quite powerful, but after years spent invested into learning C-family languages (C, C++, Java, Javascript, etc) it&#x27;s just a pain to learn.<p>I&#x27;ve not personally spent much time in it, but I hear the biggest complaint is still the compiler support&#x2F;performance being somewhat random. Can anybody here speak to that?
评论 #30685816 未加载
sgt大约 3 年前
Sometimes it feels that I&#x27;m being left behind since I don&#x27;t use Rust yet. Better get crackin&#x27;
评论 #30685322 未加载
评论 #30685466 未加载
评论 #30685576 未加载
评论 #30686226 未加载
评论 #30685662 未加载
lamontcg大约 3 年前
- learn to hate tuning Garbage Collectors<p>- learn to hate memory safety issues<p>once you master both of those bullet points, rust starts looking very attractive.
ksec大约 3 年前
The unwritten rule of HN:<p>You do not question or criticise The Rusted Holy Grail and the Riscy Silver Bullet.