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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Rust 2024 the Year of Everywhere?

102 点作者 jryb超过 2 年前

12 条评论

andrewstuart超过 2 年前
My theory is that every technology that is too complex gets replaced with something that does the same thing more simply. You see this relentlessly in the JavaScript ecosystem where waves of too-complex tools get rapidly replaced with something else, only to be swept away again when someone finds an even more simple way to do the same thing.<p>This must be the fate of Rust - eventually it will be replaced with a language that gives the memory and thread safety without the melt-your-brain complexity.<p>I want a simpler version of Rust.<p>It&#x27;s too hard.<p>Is it possible to create a truly safe language without the dizzying complexity? Or is it the complexity a baseline requirement?<p>I wonder if there is a subset of Rust that can be extracted someone into a new, minimal language with the core benefits.
评论 #32947441 未加载
评论 #32947209 未加载
评论 #32947109 未加载
评论 #32947698 未加载
评论 #32947806 未加载
评论 #32949768 未加载
评论 #32947330 未加载
评论 #32947396 未加载
评论 #32947521 未加载
评论 #32947498 未加载
评论 #32947308 未加载
评论 #32947406 未加载
评论 #32947391 未加载
评论 #32947129 未加载
评论 #32947091 未加载
评论 #32954685 未加载
评论 #32947050 未加载
评论 #32949777 未加载
评论 #32948249 未加载
评论 #32949964 未加载
评论 #32950658 未加载
评论 #32947503 未加载
评论 #32947401 未加载
评论 #32947511 未加载
评论 #32947095 未加载
评论 #32949417 未加载
评论 #33067929 未加载
infogulch超过 2 年前
Every time there&#x27;s a new post about &#x27;big new features&#x27; in current or future Rust releases there&#x27;s someone shouting in fear of how Rust is getting more and more complex. Rust may be complex, but 99% of newly added features have not made it <i>more</i> complex than the initial release.<p>Consider a different language with three orthogonal features. You could think of its &#x27;design space&#x27; as a <i>cube</i>, where each feature corresponds to a dimension, and where code that uses some features are a point in the space. If the implementors of this hypothetical language didn&#x27;t know exactly how all three features should interact together but they could figure out how pairs of features would work, you could imagine their initial implementation as the same <i>cube</i> with a chunk missing out of the corner. Later, after users and implementors gather experience about how the language feels, they make a big proposal: The next release will be a full cube instead of a cube with a corner missing! Wow! Now the big question: did this release make the language &quot;more complex&quot;? Well, it is more capable. But it doesn&#x27;t add any new orthogonal concepts, it just filled out the full space that was implied by the original three. And arguably &quot;cube&quot; is simpler than &quot;cube with a corner missing&quot;.<p>The design of Rust is the cartesian product of about five primary orthogonal features on top of some basic concepts that might be familiar to C programmers. Maybe they are: lifetimes, generics, traits, enums, unsafe. (Argue away if you choose a different five.) When these features were chosen all the way back in 2015 the designers did their best to consider what <i>might</i> happen if you tried to use various combinations of them at once; but <i>crucially</i>, large portions of the corners of this &#x27;space&#x27; <i>were left unimplemented</i> simply because it was too hard to do all at once [1]. 65 releases later, Rust has added very few new features -- as in orthogonal concepts -- [2] but has made a <i>lot</i> of progress filling in bits of the design space that was unimplemented but <i>implied</i> by the original five.<p>And that&#x27;s literally what this whole article is about: Niko&#x27;s vision for filling in Rust&#x27;s implied design space that was left unimplemented for practical reasons, &quot;Making Rust feel simpler by making it more uniform&quot;.<p>[1]: At some point after you&#x27;ve laid the foundation for a big idea it&#x27;s better to let your idea tell you how it wants to work instead of forcing it, and that requires time and experience with it.<p>[2]: async, and that&#x27;s it?
评论 #32948021 未加载
评论 #32950002 未加载
paulgb超过 2 年前
async drop is exciting because it means you can use the RAII[1] pattern for arbitrary resources. I&#x27;ve used this to, for example, manage infrastructure spun up for integration tests. I spin up a Docker container at some point in the test, assign the result to a guard variable, and then use RAII to clean it up when the variable goes out of scope.<p>Making it work without async drop was pretty hacky, so I&#x27;m looking forward to removing those hacks. Well done, Rust team!<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resource_acquisition_is_initialization" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resource_acquisition_is_initia...</a>
taylodl超过 2 年前
I&#x27;m a software developer with over four decades of experience under my belt in every environment you can imagine - startups, manufacturing company, utility, retail, banking, education - and here&#x27;s a trend I&#x27;ve noticed in that time: many languages come, a few stick, and they&#x27;re slow to fade away. Very few have stuck around for decades. Today&#x27;s darling is tomorrow&#x27;s pariah. Cobol, C&#x2F;C++, and Java are great examples of that.<p>Where is Rust? It&#x27;s behind Cobol on the TIOBE index. That puts things into perspective. I remember when C took the world by storm in the early 80&#x27;s. That was a result of severely underpowered 8 bit and 16 bit computer where your only alternative for getting any performance was to write in assembly. C&#x27;s ability to be used as a high-level assembler were its killer feature.<p>Java had a similar ascendancy in the 90&#x27;s. There were several widely-available CPU architectures that were popular at the time and it&#x27;s ability to write-once, run everywhere with acceptable performance was its killer feature. It certainly didn&#x27;t hurt that it borrowed heavily from C&#x27;s syntax.<p>What is Rust&#x27;s killer feature that will compel widespread adoption? The borrow checker? I don&#x27;t think so, and the market doesn&#x27;t appear to think so either. To wit, both C and Java enjoyed a meteoric rise within five years of their release to the public. Meanwhile Rust is nearly eight years old and yet still is lagging behind Cobol. I don&#x27;t see the situation being much different two years from now when Rust is 10 years old.<p>I have a couple of questions then. Why do you think Rust will ever experience widespread adoption? Assuming it won&#x27;t (which appears to be the case), for what programming communities would you expect for Rust to have widespread adoption?
评论 #32953003 未加载
评论 #32960059 未加载
sam0x17超过 2 年前
As a library author a big aha moment for me was being able to write proc macros. There are so many creative (and simple to implement) ways of getting around certain limitations when you can just do some smart code-gen. I think a lot of people get overwhelmed by the limitations before considering what the world of proc macros has to offer.
评论 #32948309 未加载
Decabytes超过 2 年前
For those who want something less complex than Rust, but with some of the baggage of C++ removed, I would recommend trying D.
planetis超过 2 年前
Meanwhile Nim achieves similar results with a fraction of the cost. And less braindead fanfare.
评论 #32960070 未加载
Scarbutt超过 2 年前
Rust is so simple and elegant.
评论 #32947077 未加载
robbintt超过 2 年前
I&#x27;m just sitting here learning c++.
评论 #32947334 未加载
SmileyKeith超过 2 年前
FYI your website&#x27;s CSS on mobile causes unexpected horizontal scrolling issues
up2isomorphism超过 2 年前
No matter how you think your language will be whatsoever, it is just your crowd. For the rest of the world, it does not matter at all. It is just a tool, if I need I will use it otherwise I won’t spend a single minute to look at it.<p>Also if you think memory safety is the hardest problem in programming, you probably haven’t written any non-trivial program anyway.
ilovecaching超过 2 年前
This is why Rust will eventually become the next C++ - it&#x27;s becoming just as bloated with type theory, a cumbersome syntax, and will eventually ignite a begrudging dislike by the people that have to find a subset of the language to make sense of just to write simple programs. Everything about this language is overcomplicated by language enthusiasts.<p>The best thing for Rust over the next few years is for it to fall to the wayside while saner approaches like Hare and safer C syntaxes take center stage.
评论 #32946975 未加载
评论 #32946944 未加载
评论 #32947395 未加载
评论 #32946796 未加载
评论 #32946861 未加载