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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Why build compilers in Rust instead of C?

1 点作者 calebwin超过 6 年前

2 条评论

tanin超过 6 年前
I find that Rust&#x27;s syntax&#x2F;ecosystem is much more modern and pleasant to use. Some examples are: pattern matching, immutable variable, better build and dependency system, and many more.<p>There are some concepts like lifetime that you have to learn. But you can always use unsafe pointer and look at Rust as a modern version of C.
评论 #19051215 未加载
watergatorman超过 6 年前
I found a LALR grammar for Rust on GitHub, compatible with Bison.<p>But it does not closely track the published Rust Grammar nor syntax rules in the Rust Reference. (See Rust-lang DOT org site.)<p>Although perhaps a Rust grammar could be extracted from the syntax rules in the Reference doc, it may be incomplete. For example, how do &quot;as-yet-undocumented features&quot; affect the current syntax rules in the Rust Reference?<p>So for now, it looks like C is easier to parse than Rust.