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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Do we need a “Rust Standard”?

40 点作者 georgehill超过 2 年前

5 条评论

duped超过 2 年前
Something I find interesting about this discussion is that Rust seems to be held to a significantly higher standard than any other language developed in the last 30 years.<p>I don&#x27;t think Rust needs a standard. I don&#x27;t think it needs a stable ABI. I don&#x27;t think it needs a second or third implementation. My argument is pretty simple: there are dozens of other language projects that have none of these things and have seen a lot of success. Yet these criticisms are rare of other languages - I don&#x27;t think I&#x27;ve ever seen someone lament that Swift or Go or Typescript or Dart or $ANY_LANG don&#x27;t have an ISO spec. That doesn&#x27;t mean myself and others can&#x27;t see the value in these features but it does seem to be a weird critique.<p>The better question is to state more explicitly the preconditions: C and C++ have a specification. Does Rust need one before it can replace C and C++ in projects? And I think the answer is &quot;it depends but probably not for most projects.&quot;
评论 #33350198 未加载
评论 #33350838 未加载
评论 #33349525 未加载
tialaramex超过 2 年前
As well as obeying Betteridge&#x27;s Law, Mara&#x27;s article hits a few frequent mistakes that crop up in Rust discussions: e.g. how Editions are different (I would say better) than versions of a standard language like C++.<p>One thing I think is worth more reflection is: Are there specific things such a Specification must cover, or is it enough, as it seems C and C++ felt, to just specify some of the language and leave the rest unacknowledged ?<p>For example, ANSI and ISO C significantly pre-date the memory model we&#x27;re all now comfortable C implements. They don&#x27;t offer a <i>different</i> memory model, the specification just never mentions what&#x27;s going on at all in this respect. If you wrote concurrent software in C in, say, 1996 (which I did) then eh, it does whatever it is that it happens to do. The ISO standard document has no view.<p>Right now, Rust &quot;pretty blatantly just inherits the memory model for atomics from C++20. This is not due to this model being particularly excellent or easy to understand. Indeed, this model is quite complex and known to have several flaws. Rather, it is a pragmatic concession&quot; (quoting the Nomicon). Is that good enough? If Aria&#x27;s Strict Provenance experiment goes well, how much of <i>that</i> should be specified? As much as possible? As little as possible?
rowanG077超过 2 年前
Isn&#x27;t the rustc compiler the runnable spec? I don&#x27;t particularly see the need to build a parallel spec just for people who don&#x27;t want to read the code.
评论 #33349297 未加载
singularity2001超过 2 年前
please don&#x27;t standardize it before some ugly warts are removed
suprjami超过 2 年前
With GCC adding Rust support there is no longer one &quot;official&quot; compiler. In many people&#x27;s eyes GCC will be considered &quot;the&quot; Rust compiler.<p>If Rust wants to supplant C in embedded, a specification is required. I&#x27;m honestly surprised Linux is accepting unspecified code into the kernel with the addition of Rust.
评论 #33349220 未加载
评论 #33348779 未加载
评论 #33348974 未加载