TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

1 pointsby calebwinover 6 years ago

2 comments

taninover 6 years ago
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 未加载
watergatormanover 6 years ago
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.